summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rwxr-xr-xBUILD/SETUP.sh15
-rw-r--r--CREDITS45
-rw-r--r--README10
-rw-r--r--VERSION2
-rw-r--r--client/mysql.cc77
-rw-r--r--client/mysql_upgrade.c4
-rw-r--r--client/mysqlcheck.c7
-rw-r--r--client/mysqltest.cc5
-rw-r--r--cmake/dtrace.cmake3
-rw-r--r--cmake/jemalloc.cmake18
-rw-r--r--cmake/libutils.cmake5
-rw-r--r--cmake/plugin.cmake2
-rw-r--r--cmake/ssl.cmake5
-rw-r--r--config.h.cmake4
-rw-r--r--configure.cmake29
-rw-r--r--debian/dist/Debian/mariadb-galera-server-10.0.postinst5
-rw-r--r--debian/dist/Ubuntu/mariadb-galera-server-10.0.postinst5
-rw-r--r--extra/yassl/README11
-rw-r--r--extra/yassl/include/crypto_wrapper.hpp1
-rw-r--r--extra/yassl/include/openssl/ssl.h2
-rw-r--r--extra/yassl/src/crypto_wrapper.cpp11
-rw-r--r--extra/yassl/src/yassl_imp.cpp15
-rw-r--r--extra/yassl/src/yassl_int.cpp15
-rw-r--r--include/byte_order_generic_x86_64.h2
-rw-r--r--include/my_context.h2
-rw-r--r--include/my_global.h19
-rw-r--r--include/probes_mysql_nodtrace.h.in (renamed from include/probes_mysql_nodtrace.h)0
-rw-r--r--include/violite.h6
-rw-r--r--include/welcome_copyright_notice.h6
-rw-r--r--man/mysqlcheck.118
-rw-r--r--mysql-test/extra/rpl_tests/rpl_flsh_tbls.test8
-rw-r--r--mysql-test/lib/My/SafeProcess/safe_process_win.cc10
-rw-r--r--mysql-test/lib/mtr_cases.pm1
-rw-r--r--mysql-test/r/alter_table_online.result9
-rw-r--r--mysql-test/r/contributors.result18
-rw-r--r--mysql-test/r/create.result16
-rw-r--r--mysql-test/r/ctype_utf8.result23
-rw-r--r--mysql-test/r/ctype_utf8mb4.result18
-rw-r--r--mysql-test/r/ctype_utf8mb4_heap.result2
-rw-r--r--mysql-test/r/ctype_utf8mb4_innodb.result2
-rw-r--r--mysql-test/r/ctype_utf8mb4_myisam.result2
-rw-r--r--mysql-test/r/derived.result345
-rw-r--r--mysql-test/r/events_bugs.result10
-rw-r--r--mysql-test/r/func_str.result6
-rw-r--r--mysql-test/r/func_time.result37
-rw-r--r--mysql-test/r/merge_innodb.result33
-rw-r--r--mysql-test/r/myisam-blob.result4
-rw-r--r--mysql-test/r/mysql_upgrade_view.result60
-rw-r--r--mysql-test/r/mysqlcheck.result19
-rw-r--r--mysql-test/r/partition_pruning.result18
-rw-r--r--mysql-test/r/second_frac-9175.result13
-rw-r--r--mysql-test/r/select_found.result15
-rw-r--r--mysql-test/r/sp.result18
-rw-r--r--mysql-test/r/ssl_cert_verify.result5
-rw-r--r--mysql-test/r/subselect.result14
-rw-r--r--mysql-test/r/subselect_extra_no_semijoin.result8
-rw-r--r--mysql-test/r/subselect_no_exists_to_in.result14
-rw-r--r--mysql-test/r/subselect_no_mat.result14
-rw-r--r--mysql-test/r/subselect_no_opts.result14
-rw-r--r--mysql-test/r/subselect_no_scache.result14
-rw-r--r--mysql-test/r/subselect_no_semijoin.result14
-rw-r--r--mysql-test/r/subselect_sj.result65
-rw-r--r--mysql-test/r/subselect_sj_jcl6.result65
-rw-r--r--mysql-test/r/type_blob.result33
-rw-r--r--mysql-test/r/type_date.result9
-rw-r--r--mysql-test/r/view.result20
-rw-r--r--mysql-test/std_data/ca-cert-verify.pem20
-rw-r--r--mysql-test/std_data/server-cert-verify-fail.pem19
-rw-r--r--mysql-test/std_data/server-cert-verify-pass.pem19
-rw-r--r--mysql-test/std_data/server-key-verify-fail.pem27
-rw-r--r--mysql-test/std_data/server-key-verify-pass.pem27
-rw-r--r--mysql-test/suite.pm2
-rw-r--r--mysql-test/suite/federated/federatedx.result6
-rw-r--r--mysql-test/suite/federated/federatedx.test9
-rw-r--r--mysql-test/suite/innodb/r/innodb-alter-filewrite.result30
-rw-r--r--mysql-test/suite/innodb/r/innodb-alter-table.result92
-rw-r--r--mysql-test/suite/innodb/r/innodb_monitor.result9
-rw-r--r--mysql-test/suite/innodb/r/tmpdir.result51
-rw-r--r--mysql-test/suite/innodb/t/innodb-alter-filewrite.test32
-rw-r--r--mysql-test/suite/innodb/t/innodb-alter-table.test81
-rw-r--r--mysql-test/suite/innodb/t/tmpdir.test68
-rw-r--r--mysql-test/suite/parts/t/partition_debug_innodb-master.opt2
-rw-r--r--mysql-test/suite/perfschema/r/view_table_io.result2
-rw-r--r--mysql-test/suite/perfschema/t/dml_setup_instruments.test7
-rw-r--r--mysql-test/suite/plugins/r/auth_v0100.result5
-rw-r--r--mysql-test/suite/plugins/r/feedback_plugin_install.result1
-rw-r--r--mysql-test/suite/plugins/r/feedback_plugin_load.result1
-rw-r--r--mysql-test/suite/plugins/r/feedback_plugin_send.result1
-rw-r--r--mysql-test/suite/plugins/r/server_audit.result5
-rw-r--r--mysql-test/suite/plugins/r/sql_error_log.result10
-rw-r--r--mysql-test/suite/plugins/r/thread_pool_server_audit.result5
-rw-r--r--mysql-test/suite/plugins/t/auth_v0100.test3
-rw-r--r--mysql-test/suite/plugins/t/sql_error_log.test18
-rw-r--r--mysql-test/suite/rpl/r/rpl_autogen_query_multi_byte_char.result29
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result3
-rw-r--r--mysql-test/suite/rpl/r/rpl_semi_sync_uninstall_plugin.result8
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result3
-rw-r--r--mysql-test/suite/rpl/r/rpl_unsafe_statements.result53
-rw-r--r--mysql-test/suite/rpl/t/rpl_autogen_query_multi_byte_char.test87
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel.test7
-rw-r--r--mysql-test/suite/rpl/t/rpl_semi_sync_uninstall_plugin.test6
-rw-r--r--mysql-test/suite/rpl/t/rpl_unsafe_statements.test176
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_monitor_disable_basic.result9
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_monitor_enable_basic.result9
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_monitor_reset_all_basic.result9
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_monitor_reset_basic.result9
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_tmpdir_basic.result35
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_tmpdir_basic.test48
-rw-r--r--mysql-test/suite/vcol/inc/vcol_ins_upd.inc27
-rw-r--r--mysql-test/suite/vcol/r/alter_inplace-9045.result44
-rw-r--r--mysql-test/suite/vcol/r/innodb_autoinc_vcol.result16
-rw-r--r--mysql-test/suite/vcol/r/vcol_ins_upd_innodb.result26
-rw-r--r--mysql-test/suite/vcol/r/vcol_ins_upd_myisam.result26
-rw-r--r--mysql-test/suite/vcol/t/alter_inplace-9045.test31
-rw-r--r--mysql-test/suite/vcol/t/innodb_autoinc_vcol.test9
-rw-r--r--mysql-test/t/alter_table_online.test11
-rw-r--r--mysql-test/t/create.test21
-rw-r--r--mysql-test/t/ctype_utf8.test14
-rw-r--r--mysql-test/t/ctype_utf8mb4.test12
-rw-r--r--mysql-test/t/derived.test290
-rw-r--r--mysql-test/t/events_bugs.test10
-rw-r--r--mysql-test/t/func_time.test18
-rw-r--r--mysql-test/t/merge_innodb.test31
-rw-r--r--mysql-test/t/mysql_upgrade_view.test27
-rw-r--r--mysql-test/t/mysqlcheck.test22
-rw-r--r--mysql-test/t/mysqld--help.test2
-rw-r--r--mysql-test/t/partition_pruning.test19
-rw-r--r--mysql-test/t/second_frac-9175.test9
-rw-r--r--mysql-test/t/select_found.test10
-rw-r--r--mysql-test/t/ssl_cert_verify.test43
-rw-r--r--mysql-test/t/subselect.test11
-rw-r--r--mysql-test/t/subselect_sj.test69
-rw-r--r--mysql-test/t/type_blob.test25
-rw-r--r--mysql-test/t/type_date.test7
-rw-r--r--mysql-test/t/view.test10
-rw-r--r--mysql-test/valgrind.supp10
-rw-r--r--mysys/file_logger.c2
-rw-r--r--mysys/lf_hash.c3
-rw-r--r--mysys/my_default.c1
-rw-r--r--mysys/my_gethwaddr.c2
-rw-r--r--mysys/my_rnd.c4
-rw-r--r--mysys/my_wincond.c3
-rw-r--r--mysys/string.c17
-rw-r--r--mysys_ssl/my_aes.cc4
-rw-r--r--plugin/auth_socket/CMakeLists.txt2
-rw-r--r--plugin/auth_socket/auth_socket.c2
-rw-r--r--plugin/feedback/feedback.cc12
-rw-r--r--plugin/feedback/feedback.h6
-rw-r--r--plugin/feedback/url_base.cc45
-rw-r--r--plugin/feedback/url_http.cc49
-rw-r--r--plugin/semisync/semisync_master.cc4
-rw-r--r--plugin/server_audit/CMakeLists.txt5
-rw-r--r--plugin/server_audit/plugin_audit_v4.h561
-rw-r--r--plugin/server_audit/server_audit.c878
-rw-r--r--plugin/server_audit/test_audit_v4.c162
-rw-r--r--sql-common/client.c90
-rw-r--r--sql/authors.h4
-rw-r--r--sql/client_settings.h2
-rw-r--r--sql/contributors.h18
-rw-r--r--sql/events.cc3
-rw-r--r--sql/field.cc29
-rw-r--r--sql/field.h8
-rw-r--r--sql/field_conv.cc21
-rw-r--r--sql/gcalc_slicescan.cc266
-rw-r--r--sql/gcalc_slicescan.h20
-rw-r--r--sql/gcalc_tools.cc6
-rw-r--r--sql/handler.cc2
-rw-r--r--sql/item.cc2
-rw-r--r--sql/item.h2
-rw-r--r--sql/item_cmpfunc.cc2
-rw-r--r--sql/item_cmpfunc.h2
-rw-r--r--sql/item_geofunc.cc22
-rw-r--r--sql/item_strfunc.cc2
-rw-r--r--sql/item_timefunc.cc4
-rw-r--r--sql/log.cc2
-rw-r--r--sql/log_event.cc10
-rw-r--r--sql/mysqld.cc68
-rw-r--r--sql/net_serv.cc20
-rw-r--r--sql/opt_range.cc16
-rw-r--r--sql/opt_subselect.cc14
-rw-r--r--sql/rpl_mi.cc18
-rw-r--r--sql/rpl_mi.h2
-rw-r--r--sql/rpl_reporting.cc1
-rw-r--r--sql/rpl_rli.cc4
-rw-r--r--sql/share/errmsg-utf8.txt2
-rw-r--r--sql/slave.cc31
-rw-r--r--sql/slave.h9
-rw-r--r--sql/sql_acl.cc4
-rw-r--r--sql/sql_admin.cc15
-rw-r--r--sql/sql_base.cc169
-rw-r--r--sql/sql_class.cc126
-rw-r--r--sql/sql_class.h7
-rw-r--r--sql/sql_insert.cc2
-rw-r--r--sql/sql_lex.cc15
-rw-r--r--sql/sql_lex.h16
-rw-r--r--sql/sql_parse.cc1
-rw-r--r--sql/sql_plugin.cc2
-rw-r--r--sql/sql_reload.cc2
-rw-r--r--sql/sql_select.cc27
-rw-r--r--sql/sql_select.h1
-rw-r--r--sql/sql_servers.cc2
-rw-r--r--sql/sql_show.cc25
-rw-r--r--sql/sql_show.h3
-rw-r--r--sql/sql_table.cc68
-rw-r--r--sql/sql_time.h3
-rw-r--r--sql/sql_udf.cc2
-rw-r--r--sql/sql_update.cc4
-rw-r--r--sql/sql_view.cc3
-rw-r--r--sql/sql_yacc.yy20
-rw-r--r--sql/sys_vars.cc23
-rw-r--r--sql/tztime.cc4
-rw-r--r--storage/connect/fmdlex.c9
-rw-r--r--storage/connect/ha_connect.cc42
-rw-r--r--storage/connect/json.cpp4
-rw-r--r--storage/connect/jsonudf.cpp59
-rw-r--r--storage/connect/jsonudf.h6
-rw-r--r--storage/connect/mycat.cc31
-rw-r--r--storage/connect/mycat.h10
-rw-r--r--storage/connect/mysql-test/connect/r/json_udf.result4
-rw-r--r--storage/connect/mysql-test/connect/r/odbc.result20
-rw-r--r--storage/connect/mysql-test/connect/r/odbc_oracle.result68
-rw-r--r--storage/connect/mysql-test/connect/r/odbc_postgresql.result20
-rw-r--r--storage/connect/mysql-test/connect/r/odbc_sqlite3.result4810
-rw-r--r--storage/connect/mysql-test/connect/r/odbc_sqlite3_grant.result2
-rw-r--r--storage/connect/mysql-test/connect/r/odbc_xls.result8
-rw-r--r--storage/connect/mysql-test/connect/t/json_udf.inc2
-rw-r--r--storage/connect/mysql-test/connect/t/json_udf.test3
-rw-r--r--storage/connect/mysql-test/connect/t/json_udf2.inc2
-rw-r--r--storage/connect/odbconn.cpp52
-rw-r--r--storage/connect/plgdbutl.cpp10
-rw-r--r--storage/connect/reldef.cpp13
-rw-r--r--storage/connect/reldef.h12
-rw-r--r--storage/connect/table.cpp10
-rw-r--r--storage/connect/tabmysql.cpp2
-rw-r--r--storage/connect/tabpivot.cpp4
-rw-r--r--storage/connect/tabtbl.cpp6
-rw-r--r--storage/connect/tabutil.cpp25
-rw-r--r--storage/connect/valblk.h3
-rw-r--r--storage/innobase/buf/buf0dump.cc25
-rw-r--r--storage/innobase/dict/dict0dict.cc2
-rw-r--r--storage/innobase/dict/dict0stats.cc19
-rw-r--r--storage/innobase/fts/fts0opt.cc11
-rw-r--r--storage/innobase/handler/ha_innodb.cc237
-rw-r--r--storage/innobase/handler/handler0alter.cc76
-rw-r--r--storage/innobase/include/ha_prototypes.h25
-rw-r--r--storage/innobase/include/os0file.h29
-rw-r--r--storage/innobase/include/os0sync.h2
-rw-r--r--storage/innobase/include/row0log.h5
-rw-r--r--storage/innobase/include/row0merge.h29
-rw-r--r--storage/innobase/include/srv0mon.h4
-rw-r--r--storage/innobase/include/srv0srv.h14
-rw-r--r--storage/innobase/include/univ.i2
-rw-r--r--storage/innobase/lock/lock0lock.cc2
-rw-r--r--storage/innobase/os/os0file.cc19
-rw-r--r--storage/innobase/row/row0ftsort.cc16
-rw-r--r--storage/innobase/row/row0log.cc46
-rw-r--r--storage/innobase/row/row0merge.cc233
-rw-r--r--storage/innobase/row/row0mysql.cc50
-rw-r--r--storage/innobase/srv/srv0mon.cc34
-rw-r--r--storage/innobase/srv/srv0srv.cc38
-rw-r--r--storage/innobase/srv/srv0start.cc6
-rw-r--r--storage/perfschema/CMakeLists.txt2
-rw-r--r--storage/perfschema/ha_perfschema.cc2
-rw-r--r--storage/perfschema/table_session_connect.cc5
-rw-r--r--storage/sphinx/ha_sphinx.cc2
-rw-r--r--storage/spider/spd_conn.cc30
-rw-r--r--storage/tokudb/CMakeLists.txt12
-rw-r--r--storage/tokudb/PerconaFT/util/dmt.h8
-rw-r--r--storage/tokudb/ha_tokudb.cc2
-rw-r--r--storage/tokudb/mysql-test/tokudb/t/change_column_bin.py1
-rw-r--r--storage/tokudb/mysql-test/tokudb/t/change_column_bin.test1
-rw-r--r--storage/tokudb/mysql-test/tokudb/t/change_column_char.py1
-rw-r--r--storage/tokudb/mysql-test/tokudb/t/change_column_char.test1
-rw-r--r--storage/xtradb/btr/btr0btr.cc20
-rw-r--r--storage/xtradb/btr/btr0cur.cc4
-rw-r--r--storage/xtradb/buf/buf0flu.cc23
-rw-r--r--storage/xtradb/dict/dict0dict.cc42
-rw-r--r--storage/xtradb/fil/fil0fil.cc159
-rw-r--r--storage/xtradb/fsp/fsp0fsp.cc26
-rw-r--r--storage/xtradb/handler/ha_innodb.cc83
-rw-r--r--storage/xtradb/handler/handler0alter.cc192
-rw-r--r--storage/xtradb/include/buf0flu.h2
-rw-r--r--storage/xtradb/include/fil0fil.h41
-rw-r--r--storage/xtradb/include/ha_prototypes.h13
-rw-r--r--storage/xtradb/include/os0sync.h2
-rw-r--r--storage/xtradb/include/row0merge.h5
-rw-r--r--storage/xtradb/include/srv0mon.h4
-rw-r--r--storage/xtradb/include/srv0srv.h12
-rw-r--r--storage/xtradb/include/univ.i4
-rw-r--r--storage/xtradb/log/log0recv.cc4
-rw-r--r--storage/xtradb/row/row0import.cc16
-rw-r--r--storage/xtradb/row/row0log.cc17
-rw-r--r--storage/xtradb/row/row0merge.cc77
-rw-r--r--storage/xtradb/row/row0mysql.cc50
-rw-r--r--storage/xtradb/srv/srv0mon.cc34
-rw-r--r--storage/xtradb/srv/srv0srv.cc6
-rw-r--r--storage/xtradb/srv/srv0start.cc15
-rw-r--r--storage/xtradb/sync/sync0sync.cc61
-rw-r--r--unittest/mysys/CMakeLists.txt4
-rw-r--r--unittest/mysys/dynstring-t.c74
-rw-r--r--unittest/strings/CMakeLists.txt2
-rw-r--r--vio/viosslfactories.c4
-rw-r--r--win/packaging/ca/CMakeLists.txt3
305 files changed, 9178 insertions, 4280 deletions
diff --git a/.gitignore b/.gitignore
index 4e22c2bf532..433d14db7e9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -59,6 +59,9 @@ include/mysql_version.h
include/mysqld_ername.h
include/mysqld_error.h
include/sql_state.h
+include/probes_mysql.d
+include/probes_mysql_dtrace.h
+include/probes_mysql_nodtrace.h
info_macros.cmake
libmysql*/libmysql*_exports_file.cc
libmysql*/merge_archives_mysql*.cmake
diff --git a/BUILD/SETUP.sh b/BUILD/SETUP.sh
index 860560767a7..ba2256d8269 100755
--- a/BUILD/SETUP.sh
+++ b/BUILD/SETUP.sh
@@ -31,6 +31,7 @@ Usage: $0 [-h|-n] [configure-options]
-h, --help Show this help message.
-n, --just-print Don't actually run any commands; just print them.
-c, --just-configure Stop after running configure.
+ Combined with --just-print shows configure options.
--extra-configs=xxx Add this to configure options
--extra-flags=xxx Add this C and CXX flags
--extra-cflags=xxx Add this to C flags
@@ -257,6 +258,10 @@ fi
# (http://samba.org/ccache) is installed, use it.
# We use 'grep' and hope 'grep' will work as expected
# (returns 0 if finds lines)
+
+# As cmake doesn't like CC and CXX with a space, use symlinks from
+# /usr/lib64/ccache if they exits.
+
if test "$USING_GCOV" != "1"
then
# Not using gcov; Safe to use ccache
@@ -265,8 +270,14 @@ fi
if ccache -V > /dev/null 2>&1 && test "$CCACHE_GCOV_VERSION_ENABLED" = "1"
then
- echo "$CC" | grep "ccache" > /dev/null || CC="ccache $CC"
- echo "$CXX" | grep "ccache" > /dev/null || CXX="ccache $CXX"
+ if test -x /usr/lib64/ccache/gcc
+ then
+ CC=/usr/lib64/ccache/gcc
+ fi
+ if test -x /usr/lib64/ccache/g++
+ then
+ CXX=/usr/lib64/ccache/g++
+ fi
fi
# gcov
diff --git a/CREDITS b/CREDITS
index 42ecf72ca3d..1f071e4fb44 100644
--- a/CREDITS
+++ b/CREDITS
@@ -1,25 +1,30 @@
-MariaDB is brought to you by the MariaDB foundation, a USA non profit
-organization.
+MariaDB is brought to you by the MariaDB Foundation, a non profit
+organization registered in the USA.
-The current main members and sponsors of the MariaDB foundation are:
+The current main members and sponsors of the MariaDB Foundation are:
-Automattic http://automattic.com (2014)
-SkySQL Ab http://www.skysql.com (2013, 2014)
-Booking.com http://www.booking.com (2013)
-Parallels http://www.parallels.com/products/plesk (2013)
+MariaDB Corporation http://www.mariadb.com (2013 - 2016)
+Booking.com http://www.booking.com (2013 - 2016)
+Parallels http://www.parallels.com/products/plesk (2013 - 2016)
+Automattic http://automattic.com (2014 - 2016)
+Verkkokauppa.com http://verkkokauppa.com (2015 - 2016)
+Visma http://visma.com/ (2015 - 2016)
+Webyog http://webyog.com (2015 - 2016)
+Wikimedia Foundation http://wikimedia.org (2015 - 2016)
+Acronis http://acronis.com (2016)
For a full list of supporters and sponsors see
-https://mariadb.org/en/supporters/
+https://mariadb.org/about/supporters/
-You can also do this by doing SHOW CONTRIBUTORS.
+You can also do this by running SHOW CONTRIBUTORS.
For all corporate memberships and sponsorships please contact the
-MariaDB foundation Board via foundation@mariadb.org.
+MariaDB Foundation Board via foundation@mariadb.org.
-The MariaDB foundation is responsible for the MariaDB source
+The MariaDB Foundation is responsible for the MariaDB source
repository, the official MariaDB binaries and http://mariadb.org.
-The MariaDB foundation provides also, among other things, the
+The MariaDB Foundation also provides, among other things, the
following services to the MariaDB community:
- Code reviews and applying patches for MariaDB
@@ -28,17 +33,19 @@ following services to the MariaDB community:
- Bug fixing in MariaDB (for bugs that affects a large part of the community)
- Building the official MariaDB binaries
- Maintaining http://mariadb.org
+- Documenting MariaDB in the MariaDB Knowledge Base http://mariadb.com/kb
-To be able to do the above we need help from cooperations and individuals!
+To be able to do the above we need help from corporations and individuals!
-You can help support MariaDB by be becoming a MariaDB developer or a
-member or sponsor of the MariaDB foundation!
+You can help support MariaDB by becoming a MariaDB developer or a
+member or sponsor of the MariaDB Foundation. To donate or sponsor,
+go to https://mariadb.org/donate/
-You can get a list of all main authors of MariaDB / MySQL by doing
+You can get a list of all the main authors of MariaDB / MySQL by running
SHOW AUTHORS;
-You can get a list sponsors and contributors by doing
+You can get a list sponsors and contributors by running
SHOW CONTRIBUTORS;
-You can read more about the MariaDB foundation at:
-https://mariadb.org/en/foundation/
+You can read more about the MariaDB Foundation at:
+https://mariadb.org/about/
diff --git a/README b/README
index 9c0a071ee22..b48ff32f187 100644
--- a/README
+++ b/README
@@ -56,17 +56,17 @@ About MariaDB
MariaDB is designed as a drop-in replacement of MySQL(R) with more
features, new storage engines, fewer bugs, and better performance.
-MariaDB is brought to you by the MariaDB foundation.
-Please read the file CREDITS for details about the MariaDB foundation,
+MariaDB is brought to you by the MariaDB Foundation.
+Please read the CREDITS file for details about the MariaDB Foundation,
and who is developing MariaDB.
MariaDB is developed by many of the original developers of MySQL who
-now work for MariadB foundation and SkySQL Ab, and by many people in
+now work for the MariadB Foundation and the MariaDB Corporation, and by many people in
the community.
MySQL, which is the base of MariaDB, is a product and trademark of Oracle
Corporation, Inc. For a list of developers and other contributors,
-see the Credits appendix. You can also do 'SHOW authors' to get a
+see the Credits appendix. You can also run 'SHOW authors' to get a
list of active contributors.
A description of the MariaDB project and a manual can be found at:
@@ -105,7 +105,7 @@ http://mariadb.org/jira
Bugs in the MySQL code can also be submitted at http://bugs.mysql.com
The code for MariaDB, including all revision history, can be found at:
-https://code.launchpad.net/maria
+https://github.com/MariaDB/server
***************************************************************************
diff --git a/VERSION b/VERSION
index 373cc0aaa08..99cf4ec92e3 100644
--- a/VERSION
+++ b/VERSION
@@ -1,3 +1,3 @@
MYSQL_VERSION_MAJOR=10
MYSQL_VERSION_MINOR=0
-MYSQL_VERSION_PATCH=23
+MYSQL_VERSION_PATCH=24
diff --git a/client/mysql.cc b/client/mysql.cc
index 71eac780262..f1346395dfe 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -1346,6 +1346,44 @@ sig_handler mysql_end(int sig)
exit(status.exit_status);
}
+/*
+ set connection-specific options and call mysql_real_connect
+*/
+static bool do_connect(MYSQL *mysql, const char *host, const char *user,
+ const char *password, const char *database, ulong flags)
+{
+ if (opt_secure_auth)
+ mysql_options(mysql, MYSQL_SECURE_AUTH, (char *) &opt_secure_auth);
+#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
+ if (opt_use_ssl)
+ {
+ mysql_ssl_set(mysql, opt_ssl_key, opt_ssl_cert, opt_ssl_ca,
+ opt_ssl_capath, opt_ssl_cipher);
+ mysql_options(mysql, MYSQL_OPT_SSL_CRL, opt_ssl_crl);
+ mysql_options(mysql, MYSQL_OPT_SSL_CRLPATH, opt_ssl_crlpath);
+ }
+ mysql_options(mysql,MYSQL_OPT_SSL_VERIFY_SERVER_CERT,
+ (char*)&opt_ssl_verify_server_cert);
+#endif
+ if (opt_protocol)
+ mysql_options(mysql,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol);
+#ifdef HAVE_SMEM
+ if (shared_memory_base_name)
+ mysql_options(mysql,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name);
+#endif
+ if (opt_plugin_dir && *opt_plugin_dir)
+ mysql_options(mysql, MYSQL_PLUGIN_DIR, opt_plugin_dir);
+
+ if (opt_default_auth && *opt_default_auth)
+ mysql_options(mysql, MYSQL_DEFAULT_AUTH, opt_default_auth);
+
+ mysql_options(mysql, MYSQL_OPT_CONNECT_ATTR_RESET, 0);
+ mysql_options4(mysql, MYSQL_OPT_CONNECT_ATTR_ADD,
+ "program_name", "mysql");
+ return mysql_real_connect(mysql, host, user, password, database,
+ opt_mysql_port, opt_mysql_unix_port, flags);
+}
+
/*
This function handles sigint calls
@@ -1367,11 +1405,7 @@ sig_handler handle_sigint(int sig)
}
kill_mysql= mysql_init(kill_mysql);
- mysql_options(kill_mysql, MYSQL_OPT_CONNECT_ATTR_RESET, 0);
- mysql_options4(kill_mysql, MYSQL_OPT_CONNECT_ATTR_ADD,
- "program_name", "mysql");
- if (!mysql_real_connect(kill_mysql,current_host, current_user, opt_password,
- "", opt_mysql_port, opt_mysql_unix_port,0))
+ if (!do_connect(kill_mysql,current_host, current_user, opt_password, "", 0))
{
tee_fprintf(stdout, "Ctrl-C -- sorry, cannot connect to server to kill query, giving up ...\n");
goto err;
@@ -4580,27 +4614,8 @@ sql_real_connect(char *host,char *database,char *user,char *password,
}
if (opt_compress)
mysql_options(&mysql,MYSQL_OPT_COMPRESS,NullS);
- if (opt_secure_auth)
- mysql_options(&mysql, MYSQL_SECURE_AUTH, (char *) &opt_secure_auth);
if (using_opt_local_infile)
mysql_options(&mysql,MYSQL_OPT_LOCAL_INFILE, (char*) &opt_local_infile);
-#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
- if (opt_use_ssl)
- {
- mysql_ssl_set(&mysql, opt_ssl_key, opt_ssl_cert, opt_ssl_ca,
- opt_ssl_capath, opt_ssl_cipher);
- mysql_options(&mysql, MYSQL_OPT_SSL_CRL, opt_ssl_crl);
- mysql_options(&mysql, MYSQL_OPT_SSL_CRLPATH, opt_ssl_crlpath);
- }
- mysql_options(&mysql,MYSQL_OPT_SSL_VERIFY_SERVER_CERT,
- (char*)&opt_ssl_verify_server_cert);
-#endif
- if (opt_protocol)
- mysql_options(&mysql,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol);
-#ifdef HAVE_SMEM
- if (shared_memory_base_name)
- mysql_options(&mysql,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name);
-#endif
if (safe_updates)
{
char init_command[100];
@@ -4612,18 +4627,8 @@ sql_real_connect(char *host,char *database,char *user,char *password,
mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, default_charset);
- if (opt_plugin_dir && *opt_plugin_dir)
- mysql_options(&mysql, MYSQL_PLUGIN_DIR, opt_plugin_dir);
-
- if (opt_default_auth && *opt_default_auth)
- mysql_options(&mysql, MYSQL_DEFAULT_AUTH, opt_default_auth);
-
- mysql_options(&mysql, MYSQL_OPT_CONNECT_ATTR_RESET, 0);
- mysql_options4(&mysql, MYSQL_OPT_CONNECT_ATTR_ADD,
- "program_name", "mysql");
- if (!mysql_real_connect(&mysql, host, user, password,
- database, opt_mysql_port, opt_mysql_unix_port,
- connect_flag | CLIENT_MULTI_STATEMENTS))
+ if (!do_connect(&mysql, host, user, password, database,
+ connect_flag | CLIENT_MULTI_STATEMENTS))
{
if (!silent ||
(mysql_errno(&mysql) != CR_CONN_HOST_ERROR &&
diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c
index c3240915233..f3076f61b3e 100644
--- a/client/mysql_upgrade.c
+++ b/client/mysql_upgrade.c
@@ -184,7 +184,8 @@ static const char *load_default_groups[]=
static void free_used_memory(void)
{
/* Free memory allocated by 'load_defaults' */
- free_defaults(defaults_argv);
+ if (defaults_argv)
+ free_defaults(defaults_argv);
dynstr_free(&ds_args);
dynstr_free(&conn_args);
@@ -1101,7 +1102,6 @@ int main(int argc, char **argv)
if (opt_systables_only && !opt_silent)
printf("The --upgrade-system-tables option was used, user tables won't be touched.\n");
-
/*
Read the mysql_upgrade_info file to check if mysql_upgrade
already has been run for this installation of MySQL
diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c
index 5fe620e23e4..15b98bb59c2 100644
--- a/client/mysqlcheck.c
+++ b/client/mysqlcheck.c
@@ -43,7 +43,7 @@ static my_bool opt_alldbs = 0, opt_check_only_changed = 0, opt_extended = 0,
opt_silent = 0, opt_auto_repair = 0, ignore_errors = 0,
tty_password= 0, opt_frm= 0, debug_info_flag= 0, debug_check_flag= 0,
opt_fix_table_names= 0, opt_fix_db_names= 0, opt_upgrade= 0,
- opt_do_tables= 1;
+ opt_persistent_all= 0, opt_do_tables= 1;
static my_bool opt_write_binlog= 1, opt_flush_tables= 0;
static uint verbose = 0, opt_mysql_port=0;
static int my_end_arg;
@@ -160,6 +160,10 @@ static struct my_option my_long_options[] =
{"password", 'p',
"Password to use when connecting to server. If password is not given, it's solicited on the tty.",
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
+ {"persistent", 'Z',
+ "When using ANALYZE TABLE use the PERSISTENT FOR ALL option.",
+ &opt_persistent_all, &opt_persistent_all, 0, GET_BOOL, NO_ARG,
+ 0, 0, 0, 0, 0, 0},
#ifdef __WIN__
{"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0},
@@ -915,6 +919,7 @@ static int handle_request_for_tables(char *tables, size_t length, my_bool view)
case DO_ANALYZE:
DBUG_ASSERT(!view);
op= (opt_write_binlog) ? "ANALYZE" : "ANALYZE NO_WRITE_TO_BINLOG";
+ if (opt_persistent_all) end = strmov(end, " PERSISTENT FOR ALL");
break;
case DO_OPTIMIZE:
DBUG_ASSERT(!view);
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index c601fb57f2f..026934a2feb 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -5121,12 +5121,13 @@ static int my_kill(int pid, int sig)
{
#ifdef __WIN__
HANDLE proc;
- if ((proc= OpenProcess(PROCESS_TERMINATE, FALSE, pid)) == NULL)
+ if ((proc= OpenProcess(SYNCHRONIZE|PROCESS_TERMINATE, FALSE, pid)) == NULL)
return -1;
if (sig == 0)
{
+ DWORD wait_result= WaitForSingleObject(proc, 0);
CloseHandle(proc);
- return 0;
+ return wait_result == WAIT_OBJECT_0?-1:0;
}
(void)TerminateProcess(proc, 201);
CloseHandle(proc);
diff --git a/cmake/dtrace.cmake b/cmake/dtrace.cmake
index 5d0bb7ff8c9..3edcdc4c1c5 100644
--- a/cmake/dtrace.cmake
+++ b/cmake/dtrace.cmake
@@ -86,6 +86,9 @@ IF(ENABLE_DTRACE)
${CMAKE_BINARY_DIR}/include/probes_mysql_dtrace.h
${CMAKE_BINARY_DIR}/include/probes_mysql_nodtrace.h
)
+ELSE()
+ CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/include/probes_mysql_nodtrace.h.in
+ ${CMAKE_BINARY_DIR}/include/probes_mysql_nodtrace.h COPYONLY)
ENDIF()
FUNCTION(DTRACE_INSTRUMENT target)
diff --git a/cmake/jemalloc.cmake b/cmake/jemalloc.cmake
index 876688f02f6..5a3c1bd935b 100644
--- a/cmake/jemalloc.cmake
+++ b/cmake/jemalloc.cmake
@@ -20,18 +20,22 @@ MACRO (CHECK_JEMALLOC)
SET(CMAKE_REQUIRED_LIBRARIES pthread dl m)
SET(what bundled)
ELSE()
- SET(libname jemalloc)
+ SET(libname jemalloc c)
SET(what system)
ENDIF()
- CHECK_LIBRARY_EXISTS(${libname} malloc_stats_print "" HAVE_JEMALLOC)
+ FOREACH(lib ${libname})
+ CHECK_LIBRARY_EXISTS(${lib} malloc_stats_print "" HAVE_JEMALLOC_IN_${lib})
+ IF (HAVE_JEMALLOC_IN_${lib})
+ SET(LIBJEMALLOC ${lib})
+ SET(MALLOC_LIBRARY "${what} jemalloc")
+ BREAK()
+ ENDIF()
+ ENDFOREACH()
SET(CMAKE_REQUIRED_LIBRARIES)
- IF (HAVE_JEMALLOC)
- SET(LIBJEMALLOC ${libname})
- SET(MALLOC_LIBRARY "${what} jemalloc")
- ELSEIF (NOT WITH_JEMALLOC STREQUAL "auto")
- MESSAGE(FATAL_ERROR "${libname} is not found")
+ IF (NOT LIBJEMALLOC AND NOT WITH_JEMALLOC STREQUAL "auto")
+ MESSAGE(FATAL_ERROR "jemalloc is not found")
ENDIF()
ENDIF()
ENDMACRO()
diff --git a/cmake/libutils.cmake b/cmake/libutils.cmake
index 636737b2083..5125b9482cd 100644
--- a/cmake/libutils.cmake
+++ b/cmake/libutils.cmake
@@ -87,6 +87,11 @@ MACRO(CREATE_EXPORT_FILE VAR TARGET API_FUNCTIONS)
ENDFOREACH()
SET(CONTENT "${CONTENT} (void *)0\n}\;")
CONFIGURE_FILE_CONTENT(${CONTENT} ${EXPORTS})
+ # Avoid "function redeclared as variable" error
+ # when using gcc/clang option -flto(link time optimization)
+ IF(" ${CMAKE_C_FLAGS} ${CMAKE_CXX_FLAGS} " MATCHES " -flto")
+ SET_SOURCE_FILES_PROPERTIES(${EXPORTS} PROPERTIES COMPILE_FLAGS "-fno-lto")
+ ENDIF()
SET(${VAR} ${EXPORTS})
ENDIF()
ENDMACRO()
diff --git a/cmake/plugin.cmake b/cmake/plugin.cmake
index 009f2551636..8e3af8d745f 100644
--- a/cmake/plugin.cmake
+++ b/cmake/plugin.cmake
@@ -74,7 +74,7 @@ MACRO(MYSQL_ADD_PLUGIN)
SET(WITH_${plugin} 1)
ELSEIF(WITHOUT_${plugin} OR WITHOUT_${plugin}_STORAGE_ENGINE OR
- WITH_NONE OR ${plugin}_DISABLED)
+ WITH_NONE OR ARG_DISABLED)
SET(WITHOUT_${plugin} 1)
SET(WITH_${plugin}_STORAGE_ENGINE 0)
SET(WITH_${plugin} 0)
diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake
index 26df7a47e0a..f9daa29f4b9 100644
--- a/cmake/ssl.cmake
+++ b/cmake/ssl.cmake
@@ -55,6 +55,7 @@ MACRO (MYSQL_USE_BUNDLED_SSL)
SET(SSL_INCLUDE_DIRS ${INC_DIRS})
SET(SSL_INTERNAL_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/mySTL)
SET(SSL_DEFINES "-DHAVE_YASSL -DYASSL_PREFIX -DHAVE_OPENSSL -DMULTI_THREADED")
+ SET(HAVE_ERR_remove_thread_state OFF CACHE INTERNAL "yassl doesn't have ERR_remove_thread_state")
CHANGE_SSL_SETTINGS("bundled")
ADD_SUBDIRECTORY(extra/yassl)
ADD_SUBDIRECTORY(extra/yassl/taocrypt)
@@ -199,6 +200,10 @@ MACRO (MYSQL_CHECK_SSL)
SET(SSL_INCLUDE_DIRS ${OPENSSL_INCLUDE_DIR})
SET(SSL_INTERNAL_INCLUDE_DIRS "")
SET(SSL_DEFINES "-DHAVE_OPENSSL")
+
+ SET(CMAKE_REQUIRED_LIBRARIES ${SSL_LIBRARIES})
+ CHECK_SYMBOL_EXISTS(ERR_remove_thread_state "openssl/err.h"
+ HAVE_ERR_remove_thread_state)
ELSE()
IF(WITH_SSL STREQUAL "system")
MESSAGE(SEND_ERROR "Cannot find appropriate system libraries for SSL. Use WITH_SSL=bundled to enable SSL support")
diff --git a/config.h.cmake b/config.h.cmake
index 652844b8aa1..65dd2e2d384 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -93,6 +93,7 @@
#cmakedefine HAVE_SYS_TYPES_H 1
#cmakedefine HAVE_SYS_UN_H 1
#cmakedefine HAVE_SYS_VADVISE_H 1
+#cmakedefine HAVE_UCONTEXT_H 1
#cmakedefine HAVE_TERM_H 1
#cmakedefine HAVE_TERMBITS_H 1
#cmakedefine HAVE_TERMIOS_H 1
@@ -290,7 +291,6 @@
#cmakedefine HAVE_THR_YIELD 1
#cmakedefine HAVE_TIME 1
#cmakedefine HAVE_TIMES 1
-#cmakedefine HAVE_UCONTEXT 1
#cmakedefine HAVE_VALLOC 1
#cmakedefine HAVE_VIDATTR 1
#define HAVE_VIO_READ_BUFF 1
@@ -467,7 +467,7 @@
#cmakedefine HAVE_BSD_SIGNALS 1
#cmakedefine HAVE_SVR3_SIGNALS 1
#cmakedefine HAVE_V7_SIGNALS 1
-
+#cmakedefine HAVE_ERR_remove_thread_state 1
#cmakedefine HAVE_SOLARIS_STYLE_GETHOST 1
diff --git a/configure.cmake b/configure.cmake
index 8a62db730c9..6f0ee92f774 100644
--- a/configure.cmake
+++ b/configure.cmake
@@ -792,16 +792,36 @@ ENDIF()
#
# Test for how the C compiler does inline, if at all
#
+# SunPro is weird, apparently it only supports inline at -xO3 or -xO4.
+# And if CMAKE_C_FLAGS has -xO4 but CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE} has -xO2
+# then CHECK_C_SOURCE_COMPILES will succeed but the built will fail.
+# We must test all flags here.
+# XXX actually, we can do this for all compilers, not only SunPro
+IF (CMAKE_CXX_COMPILER_ID MATCHES "SunPro" AND
+ CMAKE_GENERATOR MATCHES "Makefiles")
+ STRING(TOUPPER "CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE}" flags)
+ SET(CMAKE_REQUIRED_FLAGS "${${flags}}")
+ENDIF()
CHECK_C_SOURCE_COMPILES("
-static inline int foo(){return 0;}
+extern int bar(int x);
+static inline int foo(){return bar(1);}
int main(int argc, char *argv[]){return 0;}"
C_HAS_inline)
IF(NOT C_HAS_inline)
CHECK_C_SOURCE_COMPILES("
- static __inline int foo(){return 0;}
+ extern int bar(int x);
+ static __inline int foo(){return bar(1);}
int main(int argc, char *argv[]){return 0;}"
C_HAS___inline)
- SET(C_INLINE __inline)
+ IF(C_HAS___inline)
+ SET(C_INLINE __inline)
+ ElSE()
+ SET(C_INLINE)
+ MESSAGE(WARNING "C compiler does not support funcion inlining")
+ IF(NOT NOINLINE)
+ MESSAGE(FATAL_ERROR "Use -DNOINLINE=TRUE to allow compilation without inlining")
+ ENDIF()
+ ENDIF()
ENDIF()
IF(NOT CMAKE_CROSSCOMPILING AND NOT MSVC)
@@ -1059,5 +1079,8 @@ CHECK_STRUCT_HAS_MEMBER("struct dirent" d_ino "dirent.h" STRUCT_DIRENT_HAS_D_IN
CHECK_STRUCT_HAS_MEMBER("struct dirent" d_namlen "dirent.h" STRUCT_DIRENT_HAS_D_NAMLEN)
SET(SPRINTF_RETURNS_INT 1)
CHECK_INCLUDE_FILE(ucontext.h HAVE_UCONTEXT_H)
+IF(NOT HAVE_UCONTEXT_H)
+ CHECK_INCLUDE_FILE(sys/ucontext.h HAVE_UCONTEXT_H)
+ENDIF()
CHECK_STRUCT_HAS_MEMBER("struct timespec" tv_sec "time.h" STRUCT_TIMESPEC_HAS_TV_SEC)
CHECK_STRUCT_HAS_MEMBER("struct timespec" tv_nsec "time.h" STRUCT_TIMESPEC_HAS_TV_NSEC)
diff --git a/debian/dist/Debian/mariadb-galera-server-10.0.postinst b/debian/dist/Debian/mariadb-galera-server-10.0.postinst
index 19594fb910e..19a69ed00cb 100644
--- a/debian/dist/Debian/mariadb-galera-server-10.0.postinst
+++ b/debian/dist/Debian/mariadb-galera-server-10.0.postinst
@@ -264,6 +264,11 @@ fi
db_stop # in case invoke failes
+# If we upgrade from MySQL mysql.service may be masked, which also
+# means init.d script is disabled. Unmask mysql service explicitely.
+# Ignore exit code as command is not available everywhere.
+deb-systemd-helper unmask mysql.service > /dev/null || true
+
#DEBHELPER#
exit 0
diff --git a/debian/dist/Ubuntu/mariadb-galera-server-10.0.postinst b/debian/dist/Ubuntu/mariadb-galera-server-10.0.postinst
index 1acfbc80970..2486a09a5af 100644
--- a/debian/dist/Ubuntu/mariadb-galera-server-10.0.postinst
+++ b/debian/dist/Ubuntu/mariadb-galera-server-10.0.postinst
@@ -280,6 +280,11 @@ fi
db_stop # in case invoke failes
+# If we upgrade from MySQL mysql.service may be masked, which also
+# means init.d script is disabled. Unmask mysql service explicitely.
+# Ignore exit code as command is not available everywhere.
+deb-systemd-helper unmask mysql.service > /dev/null || true
+
#DEBHELPER#
exit 0
diff --git a/extra/yassl/README b/extra/yassl/README
index bf0e1c9f40f..81d573d0b20 100644
--- a/extra/yassl/README
+++ b/extra/yassl/README
@@ -12,6 +12,17 @@ before calling SSL_new();
*** end Note ***
+yaSSL Release notes, version 2.3.9 (12/01/2015)
+ This release of yaSSL fixes two client side Diffie-Hellman problems.
+ yaSSL was only handling the cases of zero or one leading zeros for the key
+ agreement instead of potentially any number. This caused about 1 in 50,000
+ connections to fail when using DHE cipher suites. The second problem was
+ the case where a server would send a public value shorter than the prime
+ value, causing about 1 in 128 client connections to fail, and also
+ caused the yaSSL client to read off the end of memory. All client side
+ DHE cipher suite users should update.
+ Thanks to Adam Langely (agl@imperialviolet.org) for the detailed report!
+
yaSSL Release notes, version 2.3.8 (9/17/2015)
This release of yaSSL fixes a high security vulnerability. All users
SHOULD update. If using yaSSL for TLS on the server side with private
diff --git a/extra/yassl/include/crypto_wrapper.hpp b/extra/yassl/include/crypto_wrapper.hpp
index b09b662c88c..0472b304679 100644
--- a/extra/yassl/include/crypto_wrapper.hpp
+++ b/extra/yassl/include/crypto_wrapper.hpp
@@ -378,6 +378,7 @@ public:
uint get_agreedKeyLength() const;
const byte* get_agreedKey() const;
+ uint get_publicKeyLength() const;
const byte* get_publicKey() const;
void makeAgreement(const byte*, unsigned int);
diff --git a/extra/yassl/include/openssl/ssl.h b/extra/yassl/include/openssl/ssl.h
index bec22427332..84ce40b8415 100644
--- a/extra/yassl/include/openssl/ssl.h
+++ b/extra/yassl/include/openssl/ssl.h
@@ -34,7 +34,7 @@
#include "rsa.h"
-#define YASSL_VERSION "2.3.8"
+#define YASSL_VERSION "2.3.9"
#if defined(__cplusplus)
diff --git a/extra/yassl/src/crypto_wrapper.cpp b/extra/yassl/src/crypto_wrapper.cpp
index d8bc7a75ae3..031f7560801 100644
--- a/extra/yassl/src/crypto_wrapper.cpp
+++ b/extra/yassl/src/crypto_wrapper.cpp
@@ -751,9 +751,10 @@ struct DiffieHellman::DHImpl {
byte* publicKey_;
byte* privateKey_;
byte* agreedKey_;
+ uint pubKeyLength_;
DHImpl(TaoCrypt::RandomNumberGenerator& r) : ranPool_(r), publicKey_(0),
- privateKey_(0), agreedKey_(0) {}
+ privateKey_(0), agreedKey_(0), pubKeyLength_(0) {}
~DHImpl()
{
ysArrayDelete(agreedKey_);
@@ -762,7 +763,7 @@ struct DiffieHellman::DHImpl {
}
DHImpl(const DHImpl& that) : dh_(that.dh_), ranPool_(that.ranPool_),
- publicKey_(0), privateKey_(0), agreedKey_(0)
+ publicKey_(0), privateKey_(0), agreedKey_(0), pubKeyLength_(0)
{
uint length = dh_.GetByteLength();
AllocKeys(length, length, length);
@@ -810,7 +811,7 @@ DiffieHellman::DiffieHellman(const byte* p, unsigned int pSz, const byte* g,
using TaoCrypt::Integer;
pimpl_->dh_.Initialize(Integer(p, pSz).Ref(), Integer(g, gSz).Ref());
- pimpl_->publicKey_ = NEW_YS opaque[pubSz];
+ pimpl_->publicKey_ = NEW_YS opaque[pimpl_->pubKeyLength_ = pubSz];
memcpy(pimpl_->publicKey_, pub, pubSz);
}
@@ -869,6 +870,10 @@ const byte* DiffieHellman::get_agreedKey() const
return pimpl_->agreedKey_;
}
+uint DiffieHellman::get_publicKeyLength() const
+{
+ return pimpl_->pubKeyLength_;
+}
const byte* DiffieHellman::get_publicKey() const
{
diff --git a/extra/yassl/src/yassl_imp.cpp b/extra/yassl/src/yassl_imp.cpp
index 48d0e01b1fa..a481812b3e0 100644
--- a/extra/yassl/src/yassl_imp.cpp
+++ b/extra/yassl/src/yassl_imp.cpp
@@ -109,15 +109,12 @@ void ClientDiffieHellmanPublic::build(SSL& ssl)
uint keyLength = dhClient.get_agreedKeyLength(); // pub and agree same
alloc(keyLength, true);
- dhClient.makeAgreement(dhServer.get_publicKey(), keyLength);
+ dhClient.makeAgreement(dhServer.get_publicKey(),
+ dhServer.get_publicKeyLength());
c16toa(keyLength, Yc_);
memcpy(Yc_ + KEY_OFFSET, dhClient.get_publicKey(), keyLength);
- // because of encoding first byte might be zero, don't use it for preMaster
- if (*dhClient.get_agreedKey() == 0)
- ssl.set_preMaster(dhClient.get_agreedKey() + 1, keyLength - 1);
- else
- ssl.set_preMaster(dhClient.get_agreedKey(), keyLength);
+ ssl.set_preMaster(dhClient.get_agreedKey(), keyLength);
}
@@ -321,11 +318,7 @@ void ClientDiffieHellmanPublic::read(SSL& ssl, input_buffer& input)
}
dh.makeAgreement(Yc_, keyLength);
- // because of encoding, first byte might be 0, don't use for preMaster
- if (*dh.get_agreedKey() == 0)
- ssl.set_preMaster(dh.get_agreedKey() + 1, dh.get_agreedKeyLength() - 1);
- else
- ssl.set_preMaster(dh.get_agreedKey(), dh.get_agreedKeyLength());
+ ssl.set_preMaster(dh.get_agreedKey(), dh.get_agreedKeyLength());
ssl.makeMasterSecret();
}
diff --git a/extra/yassl/src/yassl_int.cpp b/extra/yassl/src/yassl_int.cpp
index 8dad9ce052c..a38b7a5c81f 100644
--- a/extra/yassl/src/yassl_int.cpp
+++ b/extra/yassl/src/yassl_int.cpp
@@ -807,6 +807,19 @@ void SSL::set_random(const opaque* random, ConnectionEnd sender)
// store client pre master secret
void SSL::set_preMaster(const opaque* pre, uint sz)
{
+ uint i(0); // trim leading zeros
+ uint fullSz(sz);
+
+ while (i++ < fullSz && *pre == 0) {
+ sz--;
+ pre++;
+ }
+
+ if (sz == 0) {
+ SetError(bad_input);
+ return;
+ }
+
secure_.use_connection().AllocPreSecret(sz);
memcpy(secure_.use_connection().pre_master_secret_, pre, sz);
}
@@ -924,6 +937,8 @@ void SSL::order_error()
// Create and store the master secret see page 32, 6.1
void SSL::makeMasterSecret()
{
+ if (GetError()) return;
+
if (isTLS())
makeTLSMasterSecret();
else {
diff --git a/include/byte_order_generic_x86_64.h b/include/byte_order_generic_x86_64.h
index 877c1574dfa..b6b0c5d8ea5 100644
--- a/include/byte_order_generic_x86_64.h
+++ b/include/byte_order_generic_x86_64.h
@@ -31,7 +31,7 @@
Attention: Please, note, uint3korr reads 4 bytes (not 3)!
It means, that you have to provide enough allocated space.
*/
-#if defined(HAVE_purify) && !defined(_WIN32)
+#if defined(HAVE_valgrind) && !defined(_WIN32)
#define uint3korr(A) (uint32) (((uint32) ((uchar) (A)[0])) +\
(((uint32) ((uchar) (A)[1])) << 8) +\
(((uint32) ((uchar) (A)[2])) << 16))
diff --git a/include/my_context.h b/include/my_context.h
index 1bf13fd1903..976ed9850cc 100644
--- a/include/my_context.h
+++ b/include/my_context.h
@@ -31,7 +31,7 @@
#define MY_CONTEXT_USE_X86_64_GCC_ASM
#elif defined(__GNUC__) && __GNUC__ >= 3 && defined(__i386__)
#define MY_CONTEXT_USE_I386_GCC_ASM
-#elif defined(HAVE_UCONTEXT)
+#elif defined(HAVE_UCONTEXT_H)
#define MY_CONTEXT_USE_UCONTEXT
#else
#define MY_CONTEXT_DISABLE
diff --git a/include/my_global.h b/include/my_global.h
index 43bde96f684..191e08d9218 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -200,20 +200,6 @@
#define likely(x) __builtin_expect(((x) != 0),1)
#define unlikely(x) __builtin_expect(((x) != 0),0)
-/*
- now let's figure out if inline functions are supported
- autoconf defines 'inline' to be empty, if not
-*/
-#define inline_test_1(X) X ## 1
-#define inline_test_2(X) inline_test_1(X)
-#if inline_test_2(inline) != 1
-#define HAVE_INLINE
-#else
-#error Compiler does not support inline!
-#endif
-#undef inline_test_2
-#undef inline_test_1
-
/* Fix problem with S_ISLNK() on Linux */
#if defined(TARGET_OS_LINUX) || defined(__GLIBC__)
#undef _GNU_SOURCE
@@ -454,7 +440,7 @@ extern "C" int madvise(void *addr, size_t len, int behav);
#endif
#ifndef STDERR_FILENO
-#define STDERR_FILENO 2
+#define STDERR_FILENO fileno(stderr)
#endif
/*
@@ -833,6 +819,9 @@ inline unsigned long long my_double2ulonglong(double d)
#else
#define finite(x) (1.0 / fabs(x) > 0.0)
#endif /* HAVE_FINITE */
+#elif (__cplusplus >= 201103L)
+#include <cmath>
+static inline bool isfinite(double x) { return std::isfinite(x); }
#endif /* isfinite */
#ifndef HAVE_ISNAN
diff --git a/include/probes_mysql_nodtrace.h b/include/probes_mysql_nodtrace.h.in
index 2155e8489da..2155e8489da 100644
--- a/include/probes_mysql_nodtrace.h
+++ b/include/probes_mysql_nodtrace.h.in
diff --git a/include/violite.h b/include/violite.h
index 401826c1172..a7165ca91a9 100644
--- a/include/violite.h
+++ b/include/violite.h
@@ -146,6 +146,10 @@ typedef my_socket YASSL_SOCKET_T;
#include <openssl/ssl.h>
#include <openssl/err.h>
+#ifdef HAVE_ERR_remove_thread_state
+#define ERR_remove_state(X) ERR_remove_thread_state(NULL)
+#endif
+
enum enum_ssl_init_error
{
SSL_INITERR_NOERROR= 0, SSL_INITERR_CERT, SSL_INITERR_KEY,
@@ -204,7 +208,7 @@ void vio_end(void);
/* shutdown(2) flags */
#ifndef SHUT_RD
-#define SHUT_RD SD_BOTH
+#define SHUT_RD SD_RECEIVE
#endif
/*
diff --git a/include/welcome_copyright_notice.h b/include/welcome_copyright_notice.h
index 096d42446bc..e9891856221 100644
--- a/include/welcome_copyright_notice.h
+++ b/include/welcome_copyright_notice.h
@@ -1,5 +1,5 @@
-/* Copyright (c) 2011, 2015, Oracle and/or its affiliates.
- Copyright (c) 2011, 2015, MariaDB
+/* Copyright (c) 2011, 2016, Oracle and/or its affiliates.
+ Copyright (c) 2011, 2016, MariaDB
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
@@ -17,7 +17,7 @@
#ifndef _welcome_copyright_notice_h_
#define _welcome_copyright_notice_h_
-#define COPYRIGHT_NOTICE_CURRENT_YEAR "2015"
+#define COPYRIGHT_NOTICE_CURRENT_YEAR "2016"
/*
This define specifies copyright notice which is displayed by every MySQL
diff --git a/man/mysqlcheck.1 b/man/mysqlcheck.1
index c175483347c..e05bbf8a519 100644
--- a/man/mysqlcheck.1
+++ b/man/mysqlcheck.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBMYSQLCHECK\FR" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
+.TH "\FBMYSQLCHECK\FR" "1" "27/12/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -677,6 +677,22 @@ Specifying a password on the command line should be considered insecure\&. You c
.sp -1
.IP \(bu 2.3
.\}
+.\" mysqlcheck: persisent option
+.\" persistent option: mysql
+\fB\-\-persistent\fR,
+\fB\-Z\fR
+.sp
+Used with ANALYZE TABLE to append the option PERSISENT FOR ALL.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
.\" mysqlcheck: pipe option
.\" pipe option: mysql
\fB\-\-pipe\fR,
diff --git a/mysql-test/extra/rpl_tests/rpl_flsh_tbls.test b/mysql-test/extra/rpl_tests/rpl_flsh_tbls.test
index 5cbda2d591f..a8cec3d2a1a 100644
--- a/mysql-test/extra/rpl_tests/rpl_flsh_tbls.test
+++ b/mysql-test/extra/rpl_tests/rpl_flsh_tbls.test
@@ -45,7 +45,13 @@ drop table t1;
connection slave;
flush tables with read lock;
start slave;
-source include/wait_for_slave_to_start.inc;
+
+# The IO thread will not be able to read the GTID because of flush tables
+let $slave_param= Slave_IO_Running;
+let $slave_param_value= Preparing;
+source include/wait_for_slave_param.inc;
+
+--source include/wait_for_slave_sql_to_start.inc
--error 1192
stop slave;
diff --git a/mysql-test/lib/My/SafeProcess/safe_process_win.cc b/mysql-test/lib/My/SafeProcess/safe_process_win.cc
index 87a14481e25..dca2faded71 100644
--- a/mysql-test/lib/My/SafeProcess/safe_process_win.cc
+++ b/mysql-test/lib/My/SafeProcess/safe_process_win.cc
@@ -357,14 +357,14 @@ int main(int argc, const char** argv )
CloseHandle(job_handle);
message("Job terminated and closed");
- if (!jobobject_assigned)
- {
- GenerateConsoleCtrlEvent(CTRL_BREAK_EVENT, process_info.dwProcessId);
- TerminateProcess(process_info.hProcess, 202);
- }
+
if (wait_res != WAIT_OBJECT_0 + CHILD)
{
+ if (!jobobject_assigned)
+ {
+ TerminateProcess(process_info.hProcess, 202);
+ }
/* The child has not yet returned, wait for it */
message("waiting for child to exit");
if ((wait_res= WaitForSingleObject(wait_handles[CHILD], INFINITE))
diff --git a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm
index 23ae5988465..557e4259c29 100644
--- a/mysql-test/lib/mtr_cases.pm
+++ b/mysql-test/lib/mtr_cases.pm
@@ -498,6 +498,7 @@ sub process_suite {
# disabled.def
parse_disabled($suite->{dir} .'/disabled.def', $suitename);
+ parse_disabled($suite->{dir} .'/t/disabled.def', $suitename);
# combinations
if (@::opt_combinations)
diff --git a/mysql-test/r/alter_table_online.result b/mysql-test/r/alter_table_online.result
index 864ad724bc3..db7319cadf1 100644
--- a/mysql-test/r/alter_table_online.result
+++ b/mysql-test/r/alter_table_online.result
@@ -2,15 +2,9 @@ drop table if exists t1,t2,t3;
create table t1 (a int not null primary key, b int, c varchar(80), e enum('a','b'));
insert into t1 (a) values (1),(2),(3);
alter online table t1 modify b int default 5;
-ERROR 0A000: LOCK=NONE/SHARED is not supported for this operation. Try LOCK=EXCLUSIVE.
alter online table t1 change b new_name int;
-ERROR 0A000: LOCK=NONE/SHARED is not supported for this operation. Try LOCK=EXCLUSIVE.
alter online table t1 modify e enum('a','b','c');
-ERROR 0A000: LOCK=NONE/SHARED is not supported for this operation. Try LOCK=EXCLUSIVE.
alter online table t1 comment "new comment";
-ERROR 0A000: LOCK=NONE/SHARED is not supported for this operation. Try LOCK=EXCLUSIVE.
-alter online table t1 rename to t2;
-ERROR 0A000: LOCK=NONE/SHARED is not supported for this operation. Try LOCK=EXCLUSIVE.
alter online table t1 algorithm=INPLACE, lock=NONE;
alter online table t1;
alter table t1 algorithm=INPLACE;
@@ -40,10 +34,13 @@ alter online table t1 add f int;
ERROR 0A000: LOCK=NONE is not supported for this operation. Try LOCK=SHARED.
alter online table t1 engine=memory;
ERROR 0A000: LOCK=NONE is not supported. Reason: COPY algorithm requires a lock. Try LOCK=SHARED.
+alter online table t1 rename to t2;
+ERROR 0A000: LOCK=NONE/SHARED is not supported for this operation. Try LOCK=EXCLUSIVE.
alter table t1 engine=innodb;
alter table t1 add index (b);
alter online table t1 add index c (c);
alter online table t1 drop index b;
+alter online table t1 comment "new comment";
drop table t1;
create temporary table t1 (a int not null primary key, b int, c varchar(80), e enum('a','b'));
insert into t1 (a) values (1),(2),(3);
diff --git a/mysql-test/r/contributors.result b/mysql-test/r/contributors.result
index d578d43cb62..5669c6b5269 100644
--- a/mysql-test/r/contributors.result
+++ b/mysql-test/r/contributors.result
@@ -1,15 +1,13 @@
SHOW CONTRIBUTORS;
Name Location Comment
-Booking.com http://www.booking.com Founding member of the MariaDB foundation
-SkySQL Ab http://www.skysql.com Founding member of the MariaDB foundation
-Auttomatic http://automattic.com Member of the MariaDB foundation
-Parallels http://www.parallels.com/products/plesk Founding member of the MariaDB foundation
-Verkkokauppa.com Finland Sponsor of the MariaDB foundation
-Webyog Bangalor Sponsor of the MariaDB foundation
-Percona USA Sponsor of the MariaDB foundation
-Jelastic.com Russia Sponsor of the MariaDB foundation
-Planetta.net Finland Sponsor of the MariaDB foundation
-Open query Australia Sponsor of the MariaDB foundation
+Booking.com http://www.booking.com Founding member of the MariaDB Foundation
+MariaDB Corporation https://mariadb.com Founding member of the MariaDB Foundation
+Auttomattic http://automattic.com Member of the MariaDB Foundation
+Parallels http://www.parallels.com/products/plesk Founding member of the MariaDB Foundation
+Acronis http://www.acronis.com Member of the MariaDB Foundation
+Verkkokauppa.com Finland Sponsor of the MariaDB Foundation
+Webyog Bangalore Sponsor of the MariaDB Foundation
+Wikimedia Foundation USA Sponsor of the MariaDB Foundation
Google USA Sponsoring parallel replication and GTID
Facebook USA Sponsoring non-blocking API, LIMIT ROWS EXAMINED etc
Ronald Bradford Brisbane, Australia EFF contribution for UC2006 Auction
diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result
index 088cd9e531d..372e2baa02b 100644
--- a/mysql-test/r/create.result
+++ b/mysql-test/r/create.result
@@ -2662,5 +2662,21 @@ Warnings:
Note 1291 Column 'a' has duplicated value '' in ENUM
drop table t1;
set @@session.collation_server=default;
+#
+# MDEV-7765: Crash (Assertion `!table || (!table->write_set ||
+# bitmap_is_set(table->write_set, field_index) ||
+# bitmap_is_set(table->vcol_set, field_index))' fails)
+# on using function over not created table
+#
+CREATE function f1() returns int
+BEGIN
+declare n int;
+set n:= (select count(*) from t1);
+return n;
+end|
+create table t1 as select f1();
+ERROR 42S02: Table 'test.t1' doesn't exist
+drop function f1;
+End of 5.5 tests
create table t1;
ERROR 42000: A table must have at least 1 column
diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result
index 384703e1039..532c54dd79e 100644
--- a/mysql-test/r/ctype_utf8.result
+++ b/mysql-test/r/ctype_utf8.result
@@ -116,7 +116,7 @@ hex(a) STRCMP(a,'a') STRCMP(a,'a ')
DROP TABLE t1;
select insert('txs',2,1,'hi'),insert('is ',4,0,'a'),insert('txxxxt',2,4,'es');
insert('txs',2,1,'hi') insert('is ',4,0,'a') insert('txxxxt',2,4,'es')
-this is a test
+this is test
select insert("aa",100,1,"b"),insert("aa",1,3,"b");
insert("aa",100,1,"b") insert("aa",1,3,"b")
aa b
@@ -5370,9 +5370,10 @@ SET sql_mode=default;
SET NAMES utf8;
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (0), (0), (1), (0), (0);
-SELECT COUNT(*) FROM t1, t1 t2
+SELECT COUNT(*) FROM t1, t1 t2
GROUP BY INSERT('', t2.a, t1.a, (@@global.max_binlog_size));
-ERROR 23000: Duplicate entry '107374182410737418241' for key 'group_key'
+COUNT(*)
+25
DROP TABLE t1;
#
# Bug#11764503 (Bug#57341) Query in EXPLAIN EXTENDED shows wrong characters
@@ -6082,6 +6083,22 @@ c0 c1 c2 c3 c4
2012-06-11 15:18:24 2012-06-11 15:18:24 2012-06-11 15:18:24 2012-06-11 15:18:24 2012-06-11 15:18:24
DROP TABLE t2, t1;
#
+# MDEV-9319 ALTER from a bigger to a smaller blob type truncates too much data
+#
+SET NAMES utf8;
+CREATE TABLE t1 (a TEXT CHARACTER SET utf8);
+INSERT INTO t1 VALUES (REPEAT('A',100));
+SELECT OCTET_LENGTH(a) FROM t1;
+OCTET_LENGTH(a)
+300
+ALTER TABLE t1 MODIFY a TINYTEXT CHARACTER SET utf8;
+Warnings:
+Warning 1265 Data truncated for column 'a' at row 1
+SELECT OCTET_LENGTH(a),a FROM t1;
+OCTET_LENGTH(a) a
+255 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+DROP TABLE t1;
+#
# End of 5.5 tests
#
#
diff --git a/mysql-test/r/ctype_utf8mb4.result b/mysql-test/r/ctype_utf8mb4.result
index 0dc94e90454..d8e97371294 100644
--- a/mysql-test/r/ctype_utf8mb4.result
+++ b/mysql-test/r/ctype_utf8mb4.result
@@ -116,7 +116,7 @@ hex(a) STRCMP(a,'a') STRCMP(a,'a ')
DROP TABLE t1;
select insert('txs',2,1,'hi'),insert('is ',4,0,'a'),insert('txxxxt',2,4,'es');
insert('txs',2,1,'hi') insert('is ',4,0,'a') insert('txxxxt',2,4,'es')
-this is a test
+this is test
select insert("aa",100,1,"b"),insert("aa",1,3,"b");
insert("aa",100,1,"b") insert("aa",1,3,"b")
aa b
@@ -2809,6 +2809,22 @@ Warning 1292 Truncated incorrect INTEGER value: 'a'
DROP TABLE t1;
# End of test for Bug#13581962,Bug#14096619
#
+# MDEV-9319 ALTER from a bigger to a smaller blob type truncates too much data
+#
+SET NAMES utf8mb4;
+CREATE TABLE t1 (a TEXT CHARACTER SET utf8mb4);
+INSERT INTO t1 VALUES (REPEAT('😎',100));
+SELECT OCTET_LENGTH(a) FROM t1;
+OCTET_LENGTH(a)
+400
+ALTER TABLE t1 MODIFY a TINYTEXT CHARACTER SET utf8mb4;
+Warnings:
+Warning 1265 Data truncated for column 'a' at row 1
+SELECT OCTET_LENGTH(a),a FROM t1;
+OCTET_LENGTH(a) a
+252 😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎
+DROP TABLE t1;
+#
# End of 5.5 tests
#
#
diff --git a/mysql-test/r/ctype_utf8mb4_heap.result b/mysql-test/r/ctype_utf8mb4_heap.result
index 57d29a24fd0..3f543ce73e1 100644
--- a/mysql-test/r/ctype_utf8mb4_heap.result
+++ b/mysql-test/r/ctype_utf8mb4_heap.result
@@ -116,7 +116,7 @@ hex(a) STRCMP(a,'a') STRCMP(a,'a ')
DROP TABLE t1;
select insert('txs',2,1,'hi'),insert('is ',4,0,'a'),insert('txxxxt',2,4,'es');
insert('txs',2,1,'hi') insert('is ',4,0,'a') insert('txxxxt',2,4,'es')
-this is a test
+this is test
select insert("aa",100,1,"b"),insert("aa",1,3,"b");
insert("aa",100,1,"b") insert("aa",1,3,"b")
aa b
diff --git a/mysql-test/r/ctype_utf8mb4_innodb.result b/mysql-test/r/ctype_utf8mb4_innodb.result
index ba03a3f66e6..cc0ded6728d 100644
--- a/mysql-test/r/ctype_utf8mb4_innodb.result
+++ b/mysql-test/r/ctype_utf8mb4_innodb.result
@@ -116,7 +116,7 @@ hex(a) STRCMP(a,'a') STRCMP(a,'a ')
DROP TABLE t1;
select insert('txs',2,1,'hi'),insert('is ',4,0,'a'),insert('txxxxt',2,4,'es');
insert('txs',2,1,'hi') insert('is ',4,0,'a') insert('txxxxt',2,4,'es')
-this is a test
+this is test
select insert("aa",100,1,"b"),insert("aa",1,3,"b");
insert("aa",100,1,"b") insert("aa",1,3,"b")
aa b
diff --git a/mysql-test/r/ctype_utf8mb4_myisam.result b/mysql-test/r/ctype_utf8mb4_myisam.result
index c4ff8e0a882..03e32836cb5 100644
--- a/mysql-test/r/ctype_utf8mb4_myisam.result
+++ b/mysql-test/r/ctype_utf8mb4_myisam.result
@@ -116,7 +116,7 @@ hex(a) STRCMP(a,'a') STRCMP(a,'a ')
DROP TABLE t1;
select insert('txs',2,1,'hi'),insert('is ',4,0,'a'),insert('txxxxt',2,4,'es');
insert('txs',2,1,'hi') insert('is ',4,0,'a') insert('txxxxt',2,4,'es')
-this is a test
+this is test
select insert("aa",100,1,"b"),insert("aa",1,3,"b");
insert("aa",100,1,"b") insert("aa",1,3,"b")
aa b
diff --git a/mysql-test/r/derived.result b/mysql-test/r/derived.result
index 2b0b1041936..97ba35ed9cd 100644
--- a/mysql-test/r/derived.result
+++ b/mysql-test/r/derived.result
@@ -604,4 +604,349 @@ select x.id, message from (select id from t1) x left join
where coalesce(message,0) <> 0;
id message
drop table t1,t2;
+#
+# MDEV-7827: Assertion `!table || (!table->read_set ||
+# bitmap_is_set(table->read_set, field_index))' failed
+# in Field_long::val_str on EXPLAIN EXTENDED
+#
+CREATE TABLE t1 (f1 INT, f2 INT, KEY(f2)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (6,9);
+CREATE TABLE t2 (f3 INT) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (2),(0);
+EXPLAIN EXTENDED
+SELECT f1 FROM ( SELECT * FROM t1 ) AS sq
+WHERE f1 IN (
+SELECT f3 FROM t2 WHERE f2 IN (
+SELECT f3 FROM t2 HAVING f3 >= 8
+)
+);
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY <derived2> system NULL NULL NULL NULL 1 100.00
+1 PRIMARY <subquery4> eq_ref distinct_key distinct_key 4 sq.f2 1 100.00
+1 PRIMARY t2 ALL NULL NULL NULL NULL 2 100.00 Using where; FirstMatch(<subquery4>); Using join buffer (flat, BNL join)
+4 MATERIALIZED t2 ALL NULL NULL NULL NULL 2 100.00
+2 DERIVED t1 system NULL NULL NULL NULL 1 100.00
+Warnings:
+Note 1276 Field or reference 'sq.f2' of SELECT #3 was resolved in SELECT #1
+Note 1003 select 6 AS `f1` from <materialize> (select `test`.`t2`.`f3` from `test`.`t2` having (`test`.`t2`.`f3` >= 8)) semi join (`test`.`t2`) where ((`test`.`t2`.`f3` = 6) and (9 = `<subquery4>`.`f3`))
+DROP TABLE t2,t1;
+#
+# MDEV-9462: Out of memory using explain on 2 empty tables
+#
+CREATE TABLE `t1` (
+`REC_GROUP` char(2) DEFAULT NULL,
+`CLIENT_INFO` text CHARACTER SET utf8,
+`NAME` text,
+`PHONE_NUMBER` text,
+`ATTENTION_NAME` text,
+`PAYMENT_TERM` text CHARACTER SET utf8,
+`CREDIT_LIMIT` decimal(12,2) DEFAULT NULL,
+`LAST_PAY_DATE` text CHARACTER SET utf8,
+`TOTAL` double DEFAULT NULL,
+`TOTAL_MCL` double DEFAULT NULL,
+`TOTAL_MFS` double DEFAULT NULL,
+`TOTAL_MIS` double DEFAULT NULL,
+`BEFORE_DUE_7_MCL` double DEFAULT NULL,
+`BEFORE_DUE_7_MFS` double DEFAULT NULL,
+`BEFORE_DUE_7_MIS` double DEFAULT NULL,
+`PER1_MCL` double DEFAULT NULL,
+`PER1_MFS` double DEFAULT NULL,
+`PER1_MIS` double DEFAULT NULL,
+`PER2_MCL` double DEFAULT NULL,
+`PER2_MFS` double DEFAULT NULL,
+`PER2_MIS` double DEFAULT NULL,
+`PER3_MCL` double DEFAULT NULL,
+`PER3_MFS` double DEFAULT NULL,
+`PER3_MIS` double DEFAULT NULL,
+`PER4_MCL` double DEFAULT NULL,
+`PER4_MFS` double DEFAULT NULL,
+`PER4_MIS` double DEFAULT NULL,
+`PER5_MCL` double DEFAULT NULL,
+`PER5_MFS` double DEFAULT NULL,
+`PER5_MIS` double DEFAULT NULL,
+`PER6_MCL` double DEFAULT NULL,
+`PER6_MFS` double DEFAULT NULL,
+`PER6_MIS` double DEFAULT NULL,
+`PER7_MCL` double DEFAULT NULL,
+`PER7_MFS` double DEFAULT NULL,
+`PER7_MIS` double DEFAULT NULL,
+`BEFORE_DUE_7` double DEFAULT NULL,
+`PER1` double DEFAULT NULL,
+`PER2` double DEFAULT NULL,
+`PER3` double DEFAULT NULL,
+`PER4` double DEFAULT NULL,
+`PER5` double DEFAULT NULL,
+`PER6` double DEFAULT NULL,
+`PER7` double DEFAULT NULL,
+`REF` varchar(30) DEFAULT NULL,
+`TYPE` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL
+);
+CREATE TABLE `t2` (
+`RECEIVABLE_GROUP` char(2) DEFAULT NULL,
+`CLIENT_NUMBER` varchar(35) DEFAULT NULL,
+`CLIENT_NAME` varchar(73) DEFAULT NULL,
+`PHONE_NUMBER` char(12) DEFAULT NULL,
+`ATTENTION_NAME` char(26) DEFAULT NULL,
+`PAYMENT_TERM` varchar(26) CHARACTER SET utf8 DEFAULT NULL,
+`CREDIT_LIMIT` decimal(12,2) DEFAULT NULL,
+`LAST_PAY_DATE` varchar(42) CHARACTER SET utf8 DEFAULT NULL,
+`TOTAL` decimal(12,2) DEFAULT NULL,
+`BEFORE_DUE_7` decimal(12,2) DEFAULT NULL,
+`PER1` decimal(12,2) DEFAULT NULL,
+`PER2` decimal(12,2) DEFAULT NULL,
+`PER3` decimal(12,2) DEFAULT NULL,
+`PER4` decimal(12,2) DEFAULT NULL,
+`PER5` decimal(12,2) DEFAULT NULL,
+`PER6` decimal(12,2) DEFAULT NULL,
+`PER7` decimal(12,2) DEFAULT NULL,
+`DIVISION` varchar(3) CHARACTER SET utf8 NOT NULL,
+`CLIENT_INFO` varchar(294) CHARACTER SET utf8 DEFAULT NULL,
+`EXCHANGE_RATE` double NOT NULL,
+`REF` varchar(30) DEFAULT NULL
+);
+explain
+SELECT A.RECEIVABLE_GROUP,A.CLIENT_INFO,A.CLIENT_NAME,A.PHONE_NUMBER,A.ATTENTION_NAME,A.PAYMENT_TERM,A.CREDIT_LIMIT,A.LAST_PAY_DATE,A.TOTAL,
+COALESCE(B.TOTAL_MCL,0) AS TOTAL_MCL,
+COALESCE(C.TOTAL_MFS,0) AS TOTAL_MFS,
+COALESCE(D.TOTAL_MIS,0) AS TOTAL_MIS,
+COALESCE(F.BEFORE_DUE_7_MCL,0) AS BEFORE_DUE_7_MCL,
+COALESCE(G.BEFORE_DUE_7_MFS,0) AS BEFORE_DUE_7_MFS,
+COALESCE(H.BEFORE_DUE_7_MIS,0) AS BEFORE_DUE_7_MIS,
+COALESCE(I.PER1_MCL,0) AS PER1_MCL,
+COALESCE(J.PER1_MFS,0) AS PER1_MFS,
+COALESCE(K.PER1_MIS,0) AS PER1_MIS,
+COALESCE(L.PER2_MCL,0) AS PER2_MCL,
+COALESCE(M.PER2_MFS,0) AS PER2_MFS,
+COALESCE(N.PER2_MIS,0) AS PER2_MIS,
+COALESCE(O.PER3_MCL,0) AS PER3_MCL,
+COALESCE(P.PER3_MFS,0) AS PER3_MFS,
+COALESCE(R.PER3_MIS,0) AS PER3_MIS,
+COALESCE(S.PER4_MCL,0) AS PER4_MCL,
+COALESCE(T.PER4_MFS,0) AS PER4_MFS,
+COALESCE(U.PER4_MIS,0) AS PER4_MIS,
+COALESCE(V.PER5_MCL,0) AS PER5_MCL,
+COALESCE(X.PER5_MFS,0) AS PER5_MFS,
+COALESCE(Z.PER5_MIS,0) AS PER5_MIS,
+COALESCE(Q.PER6_MCL,0) AS PER6_MCL,
+COALESCE(Y.PER6_MFS,0) AS PER6_MFS,
+COALESCE(W.PER6_MIS,0) AS PER6_MIS,
+COALESCE(A1.PER7_MCL,0) AS PER7_MCL,
+COALESCE(B1.PER7_MFS,0) AS PER7_MFS,
+COALESCE(C1.PER7_MIS,0) AS PER7_MIS,
+A.BEFORE_DUE_7,A.PER1,A.PER2,A.PER3,A.PER4,A.PER5,A.PER6,A.PER7,
+CONCAT(A.DIVISION,'-',A.CLIENT_NUMBER) AS REF,"2" AS TYPE FROM
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,
+GROUP_CONCAT(DISTINCT CLIENT_INFO SEPARATOR '<br>') AS CLIENT_INFO,
+GROUP_CONCAT(DISTINCT CLIENT_NAME SEPARATOR '<br>') AS CLIENT_NAME,
+GROUP_CONCAT( DISTINCT `PHONE_NUMBER` SEPARATOR '<br>' ) AS PHONE_NUMBER ,
+GROUP_CONCAT( DISTINCT `ATTENTION_NAME` SEPARATOR '<br>' ) AS ATTENTION_NAME,
+GROUP_CONCAT( DISTINCT `PAYMENT_TERM` SEPARATOR '<br>' ) AS PAYMENT_TERM,
+CREDIT_LIMIT ,
+GROUP_CONCAT( `LAST_PAY_DATE` SEPARATOR '<br>' ) AS LAST_PAY_DATE,
+SUM( `TOTAL`*EXCHANGE_RATE ) AS TOTAL,
+SUM( `BEFORE_DUE_7`*EXCHANGE_RATE ) AS BEFORE_DUE_7,
+SUM( `PER1`*EXCHANGE_RATE ) AS PER1,
+SUM( `PER2`*EXCHANGE_RATE ) AS PER2,
+SUM( `PER3`*EXCHANGE_RATE ) AS PER3,
+SUM( `PER4`*EXCHANGE_RATE ) AS PER4,
+SUM( `PER5`*EXCHANGE_RATE ) AS PER5,
+SUM( `PER6`*EXCHANGE_RATE ) AS PER6,
+SUM( `PER7`*EXCHANGE_RATE ) AS PER7
+FROM `t2`
+WHERE REF IS NULL GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS A
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( `TOTAL`*EXCHANGE_RATE ) AS TOTAL_MCL
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MCL" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS B ON A.CLIENT_NUMBER=B.CLIENT_NUMBER AND
+A.DIVISION=B.DIVISION AND A.RECEIVABLE_GROUP=B.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=B.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( `TOTAL`*EXCHANGE_RATE ) AS TOTAL_MFS
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MFS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS C ON A.CLIENT_NUMBER=C.CLIENT_NUMBER
+AND
+A.DIVISION=C.DIVISION AND A.RECEIVABLE_GROUP=C.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=C.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( `TOTAL`*EXCHANGE_RATE ) AS TOTAL_MIS
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MIS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS D ON A.CLIENT_NUMBER=D.CLIENT_NUMBER AND
+A.DIVISION=D.DIVISION AND A.RECEIVABLE_GROUP=D.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=D.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( BEFORE_DUE_7*EXCHANGE_RATE ) AS BEFORE_DUE_7_MCL
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MCL" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS F ON A.CLIENT_NUMBER=F.CLIENT_NUMBER AND
+A.DIVISION=F.DIVISION AND A.RECEIVABLE_GROUP=F.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=F.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( BEFORE_DUE_7*EXCHANGE_RATE ) AS BEFORE_DUE_7_MFS
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MFS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS G ON A.CLIENT_NUMBER=G.CLIENT_NUMBER AND
+A.DIVISION=G.DIVISION AND A.RECEIVABLE_GROUP=G.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=G.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( BEFORE_DUE_7*EXCHANGE_RATE ) AS BEFORE_DUE_7_MIS
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MIS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS H ON A.CLIENT_NUMBER=H.CLIENT_NUMBER AND
+A.DIVISION=H.DIVISION AND A.RECEIVABLE_GROUP=H.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=H.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER1*EXCHANGE_RATE ) AS PER1_MCL
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MCL" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS I ON A.CLIENT_NUMBER=I.CLIENT_NUMBER AND
+A.DIVISION=I.DIVISION AND A.RECEIVABLE_GROUP=I.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=I.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER1*EXCHANGE_RATE ) AS PER1_MFS
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MFS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS J ON A.CLIENT_NUMBER=J.CLIENT_NUMBER AND
+A.DIVISION=J.DIVISION AND A.RECEIVABLE_GROUP=J.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=J.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER1*EXCHANGE_RATE ) AS PER1_MIS
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MIS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS K ON A.CLIENT_NUMBER=K.CLIENT_NUMBER AND
+A.DIVISION=K.DIVISION AND A.RECEIVABLE_GROUP=K.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=K.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER2*EXCHANGE_RATE ) AS PER2_MCL
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MCL" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS L ON A.CLIENT_NUMBER=L.CLIENT_NUMBER AND
+A.DIVISION=L.DIVISION AND A.RECEIVABLE_GROUP=L.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=L.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER2*EXCHANGE_RATE ) AS PER2_MFS
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MFS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS M ON A.CLIENT_NUMBER=M.CLIENT_NUMBER AND
+A.DIVISION=M.DIVISION AND A.RECEIVABLE_GROUP=M.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=M.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER2*EXCHANGE_RATE ) AS PER2_MIS
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MIS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS N ON A.CLIENT_NUMBER=N.CLIENT_NUMBER AND
+A.DIVISION=N.DIVISION AND A.RECEIVABLE_GROUP=N.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=N.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER3*EXCHANGE_RATE ) AS PER3_MCL
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MCL" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS O ON A.CLIENT_NUMBER=O.CLIENT_NUMBER AND
+A.DIVISION=O.DIVISION AND A.RECEIVABLE_GROUP=O.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=O.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER3*EXCHANGE_RATE ) AS PER3_MFS
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MFS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS P ON A.CLIENT_NUMBER=P.CLIENT_NUMBER AND
+A.DIVISION=P.DIVISION AND A.RECEIVABLE_GROUP=P.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=P.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER3*EXCHANGE_RATE ) AS PER3_MIS
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MIS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS R ON A.CLIENT_NUMBER=R.CLIENT_NUMBER AND
+A.DIVISION=R.DIVISION AND A.RECEIVABLE_GROUP=R.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=R.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER4*EXCHANGE_RATE ) AS PER4_MCL
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MCL" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS S ON A.CLIENT_NUMBER=S.CLIENT_NUMBER AND
+A.DIVISION=S.DIVISION AND A.RECEIVABLE_GROUP=S.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=S.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER4*EXCHANGE_RATE ) AS PER4_MFS
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MFS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS T ON A.CLIENT_NUMBER=T.CLIENT_NUMBER AND
+A.DIVISION=T.DIVISION AND A.RECEIVABLE_GROUP=T.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=T.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER4*EXCHANGE_RATE ) AS PER4_MIS
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MIS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS U ON A.CLIENT_NUMBER=U.CLIENT_NUMBER AND
+A.DIVISION=U.DIVISION AND A.RECEIVABLE_GROUP=U.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=U.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER5*EXCHANGE_RATE ) AS PER5_MCL
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MCL" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS V ON A.CLIENT_NUMBER=V.CLIENT_NUMBER AND
+A.DIVISION=V.DIVISION AND A.RECEIVABLE_GROUP=V.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=V.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER5*EXCHANGE_RATE ) AS PER5_MFS
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MFS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS X ON A.CLIENT_NUMBER=X.CLIENT_NUMBER AND
+A.DIVISION=X.DIVISION AND A.RECEIVABLE_GROUP=X.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=X.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER5*EXCHANGE_RATE ) AS PER5_MIS
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MIS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS Z ON A.CLIENT_NUMBER=Z.CLIENT_NUMBER AND
+A.DIVISION=Z.DIVISION AND A.RECEIVABLE_GROUP=Z.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=Z.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER6*EXCHANGE_RATE ) AS PER6_MCL
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MCL" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS Q ON A.CLIENT_NUMBER=Q.CLIENT_NUMBER AND
+A.DIVISION=Q.DIVISION AND A.RECEIVABLE_GROUP=Q.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=Q.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER6*EXCHANGE_RATE ) AS PER6_MFS
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MFS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS Y ON A.CLIENT_NUMBER=Y.CLIENT_NUMBER AND
+A.DIVISION=Y.DIVISION AND A.RECEIVABLE_GROUP=Y.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=Y.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER6*EXCHANGE_RATE ) AS PER6_MIS
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MIS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS W ON A.CLIENT_NUMBER=W.CLIENT_NUMBER AND
+A.DIVISION=W.DIVISION AND A.RECEIVABLE_GROUP=W.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=W.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER7*EXCHANGE_RATE ) AS PER7_MCL
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MCL" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS A1 ON A.CLIENT_NUMBER=A1.CLIENT_NUMBER AND
+A.DIVISION=A1.DIVISION AND A.RECEIVABLE_GROUP=A1.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=A1.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER7*EXCHANGE_RATE ) AS PER7_MFS
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MFS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS B1 ON A.CLIENT_NUMBER=B1.CLIENT_NUMBER AND
+A.DIVISION=B1.DIVISION AND A.RECEIVABLE_GROUP=B1.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=B1.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER7*EXCHANGE_RATE ) AS PER7_MIS
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MIS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS C1 ON A.CLIENT_NUMBER=C1.CLIENT_NUMBER AND
+A.DIVISION=C1.DIVISION AND A.RECEIVABLE_GROUP=C1.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=C1.CREDIT_LIMIT
+ORDER BY TOTAL DESC;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY <derived2> system NULL NULL NULL NULL 0 const row not found
+1 PRIMARY <derived3> system NULL NULL NULL NULL 0 const row not found
+1 PRIMARY <derived4> system NULL NULL NULL NULL 0 const row not found
+1 PRIMARY <derived5> system NULL NULL NULL NULL 0 const row not found
+1 PRIMARY <derived6> system NULL NULL NULL NULL 0 const row not found
+1 PRIMARY <derived7> system NULL NULL NULL NULL 0 const row not found
+1 PRIMARY <derived8> system NULL NULL NULL NULL 0 const row not found
+1 PRIMARY <derived9> system NULL NULL NULL NULL 0 const row not found
+1 PRIMARY <derived10> system NULL NULL NULL NULL 0 const row not found
+1 PRIMARY <derived11> system NULL NULL NULL NULL 0 const row not found
+1 PRIMARY <derived12> system NULL NULL NULL NULL 0 const row not found
+1 PRIMARY <derived13> system NULL NULL NULL NULL 0 const row not found
+1 PRIMARY <derived14> system NULL NULL NULL NULL 0 const row not found
+1 PRIMARY <derived15> system NULL NULL NULL NULL 0 const row not found
+1 PRIMARY <derived16> system NULL NULL NULL NULL 0 const row not found
+1 PRIMARY <derived17> system NULL NULL NULL NULL 0 const row not found
+1 PRIMARY <derived18> system NULL NULL NULL NULL 0 const row not found
+1 PRIMARY <derived19> system NULL NULL NULL NULL 0 const row not found
+1 PRIMARY <derived20> system NULL NULL NULL NULL 0 const row not found
+1 PRIMARY <derived21> system NULL NULL NULL NULL 0 const row not found
+1 PRIMARY <derived22> system NULL NULL NULL NULL 0 const row not found
+1 PRIMARY <derived23> system NULL NULL NULL NULL 0 const row not found
+1 PRIMARY <derived24> system NULL NULL NULL NULL 0 const row not found
+1 PRIMARY <derived25> system NULL NULL NULL NULL 0 const row not found
+1 PRIMARY <derived26> system NULL NULL NULL NULL 0 const row not found
+1 PRIMARY <derived27> system NULL NULL NULL NULL 0 const row not found
+1 PRIMARY <derived28> system NULL NULL NULL NULL 0 const row not found
+1 PRIMARY <derived29> system NULL NULL NULL NULL 0 const row not found
+29 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+28 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+27 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+26 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+25 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+24 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+23 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+22 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+21 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+20 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+19 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+18 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+17 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+16 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+15 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+14 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+13 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+12 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+11 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+10 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+9 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+8 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+7 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+6 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+5 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+4 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+3 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+2 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+DROP TABLES t1,t2;
set optimizer_switch=@save_derived_optimizer_switch;
diff --git a/mysql-test/r/events_bugs.result b/mysql-test/r/events_bugs.result
index e3599218aac..f1ff0faaa47 100644
--- a/mysql-test/r/events_bugs.result
+++ b/mysql-test/r/events_bugs.result
@@ -90,7 +90,7 @@ create table events_smode_test(ev_name char(10), a date);
"This should never insert something"
create event ee_16407_2 on schedule every 60 second do
begin
-select get_lock('ee_16407_2', 60) /*ee_16407_2*/;
+select get_lock('ee_16407_2', 60); /*ee_16407_2*/
select release_lock('ee_16407_2');
insert into events_test.events_smode_test values('ee_16407_2','1980-19-02');
end|
@@ -99,7 +99,7 @@ ERROR 22007: Incorrect date value: '1980-19-02' for column 'a' at row 1
"This is ok"
create event ee_16407_3 on schedule every 60 second do
begin
-select get_lock('ee_16407_2', 60) /*ee_16407_3*/;
+select get_lock('ee_16407_2', 60); /*ee_16407_3*/
select release_lock('ee_16407_2');
insert into events_test.events_smode_test values ('ee_16407_3','1980-02-19');
insert into events_test.events_smode_test values ('ee_16407_3','1980-02-29');
@@ -108,7 +108,7 @@ set sql_mode=""|
"This will insert rows but they will be truncated"
create event ee_16407_4 on schedule every 60 second do
begin
-select get_lock('ee_16407_2', 60) /*ee_16407_4*/;
+select get_lock('ee_16407_2', 60); /*ee_16407_4*/
select release_lock('ee_16407_2');
insert into events_test.events_smode_test values ('ee_16407_4','10-11-1956');
end|
@@ -156,13 +156,13 @@ create procedure ee_16407_5_pendant() begin insert into events_test.events_smode
create procedure ee_16407_6_pendant() begin insert into events_test.events_smode_test values('ee_16407_6','2004-02-29'); end|
create event ee_16407_5 on schedule every 60 second do
begin
-select get_lock('ee_16407_5', 60) /*ee_16407_5*/;
+select get_lock('ee_16407_5', 60); /*ee_16407_5*/
select release_lock('ee_16407_5');
call events_test.ee_16407_5_pendant();
end|
create event ee_16407_6 on schedule every 60 second do
begin
-select get_lock('ee_16407_5', 60) /*ee_16407_6*/;
+select get_lock('ee_16407_5', 60); /*ee_16407_6*/
select release_lock('ee_16407_5');
call events_test.ee_16407_6_pendant();
end|
diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result
index bc5f6951184..8f08d7acd25 100644
--- a/mysql-test/r/func_str.result
+++ b/mysql-test/r/func_str.result
@@ -203,7 +203,7 @@ CONCAT('"',CONCAT_WS('";"',repeat('a',60),repeat('b',60),repeat('c',60),repeat('
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb";"cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc";"dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd"
select insert('txs',2,1,'hi'),insert('is ',4,0,'a'),insert('txxxxt',2,4,'es');
insert('txs',2,1,'hi') insert('is ',4,0,'a') insert('txxxxt',2,4,'es')
-this is a test
+this is test
select replace('aaaa','a','b'),replace('aaaa','aa','b'),replace('aaaa','a','bb'),replace('aaaa','','b'),replace('bbbb','a','c');
replace('aaaa','a','b') replace('aaaa','aa','b') replace('aaaa','a','bb') replace('aaaa','','b') replace('bbbb','a','c')
bbbb bb bbbbbbbb aaaa bbbb
@@ -2335,7 +2335,7 @@ INSERT('abc', 3, 3, '1234')
ab1234
SELECT INSERT('abc', 4, 3, '1234');
INSERT('abc', 4, 3, '1234')
-abc1234
+abc
SELECT INSERT('abc', 5, 3, '1234');
INSERT('abc', 5, 3, '1234')
abc
@@ -2625,7 +2625,7 @@ CREATE TABLE t1 ( a TEXT );
SELECT 'aaaaaaaaaaaaaa' INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/bug58165.txt';;
SELECT insert( substring_index( 'a', 'a', 'b' ), 1, 0, 'x' );
insert( substring_index( 'a', 'a', 'b' ), 1, 0, 'x' )
-x
+
Warnings:
Warning 1292 Truncated incorrect INTEGER value: 'b'
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug58165.txt' INTO TABLE t1;;
diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result
index b660df15fed..85ba5d73f36 100644
--- a/mysql-test/r/func_time.result
+++ b/mysql-test/r/func_time.result
@@ -1722,6 +1722,43 @@ select 1 from t1 where 1 < some (select cast(a as datetime) from t1);
1
1
drop table t1;
+#
+# Bug #21564557: INCONSISTENT OUTPUT FROM 5.5 AND 5.6
+# UNIX_TIMESTAMP(STR_TO_DATE('201506', "%Y%M"
+#
+SELECT UNIX_TIMESTAMP(STR_TO_DATE('201506', "%Y%m"));
+UNIX_TIMESTAMP(STR_TO_DATE('201506', "%Y%m"))
+NULL
+Warnings:
+Warning 1411 Incorrect datetime value: '201506' for function str_to_date
+SELECT UNIX_TIMESTAMP('2015-06-00');
+UNIX_TIMESTAMP('2015-06-00')
+NULL
+Warnings:
+Warning 1292 Incorrect datetime value: '2015-06-00'
+SELECT UNIX_TIMESTAMP(STR_TO_DATE('0000-00-00 10:30:30', '%Y-%m-%d %h:%i:%s'));
+UNIX_TIMESTAMP(STR_TO_DATE('0000-00-00 10:30:30', '%Y-%m-%d %h:%i:%s'))
+NULL
+set sql_mode= 'TRADITIONAL';
+SELECT @@sql_mode;
+@@sql_mode
+STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
+SELECT UNIX_TIMESTAMP(STR_TO_DATE('201506', "%Y%m"));
+UNIX_TIMESTAMP(STR_TO_DATE('201506', "%Y%m"))
+NULL
+Warnings:
+Warning 1411 Incorrect datetime value: '201506' for function str_to_date
+SELECT UNIX_TIMESTAMP('2015-06-00');
+UNIX_TIMESTAMP('2015-06-00')
+NULL
+Warnings:
+Warning 1292 Incorrect datetime value: '2015-06-00'
+SELECT UNIX_TIMESTAMP(STR_TO_DATE('0000-00-00 10:30:30', '%Y-%m-%d %h:%i:%s'));
+UNIX_TIMESTAMP(STR_TO_DATE('0000-00-00 10:30:30', '%Y-%m-%d %h:%i:%s'))
+NULL
+Warnings:
+Warning 1411 Incorrect datetime value: '0000-00-00 10:30:30' for function str_to_date
+set sql_mode= default;
select time('10:10:10') > 10;
time('10:10:10') > 10
1
diff --git a/mysql-test/r/merge_innodb.result b/mysql-test/r/merge_innodb.result
index f6057d279b1..5aa344a9391 100644
--- a/mysql-test/r/merge_innodb.result
+++ b/mysql-test/r/merge_innodb.result
@@ -35,3 +35,36 @@ c1
Ann
Alice
DROP TABLE t1, t2, t3, t4, t5;
+create table t1 (c1 varchar(100));
+create table t2 (c1 varchar(100));
+create view t3 as select * from t1;
+insert into t1 values ('ann'), ('alice');
+insert into t2 values ('bob'), ('brian');
+create temporary table t4 (c1 varchar(100)) engine=MERGE union=(t2, t1);
+create temporary table t5 (c1 varchar(100)) engine=MERGE union=(t3, t1);
+select * from t5;
+ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
+lock tables t1 read, t2 read, t3 read, t4 read;
+select * from t5;
+ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
+select * from t4;
+c1
+bob
+brian
+ann
+alice
+unlock tables;
+drop table t2;
+create view t2 as select * from t1;
+select * from t4;
+ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
+lock tables t1 read, t2 read, t3 read;
+select * from t4;
+ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
+select * from t4;
+ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
+select * from t4;
+ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
+unlock tables;
+drop view t2, t3;
+drop table t1;
diff --git a/mysql-test/r/myisam-blob.result b/mysql-test/r/myisam-blob.result
index 43db7c8badd..6b41a244621 100644
--- a/mysql-test/r/myisam-blob.result
+++ b/mysql-test/r/myisam-blob.result
@@ -29,9 +29,11 @@ select length(data) from t1;
length(data)
18874368
alter table t1 modify data blob;
+Warnings:
+Warning 1265 Data truncated for column 'data' at row 1
select length(data) from t1;
length(data)
-0
+65535
drop table t1;
CREATE TABLE t1 (data BLOB) ENGINE=myisam;
INSERT INTO t1 (data) VALUES (NULL);
diff --git a/mysql-test/r/mysql_upgrade_view.result b/mysql-test/r/mysql_upgrade_view.result
index 63f86af3591..7966941cb1f 100644
--- a/mysql-test/r/mysql_upgrade_view.result
+++ b/mysql-test/r/mysql_upgrade_view.result
@@ -318,4 +318,64 @@ master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; REPAIR VIEW `v4` FROM MYSQL
drop table if exists kv;
drop view v1,v2,v3,v4;
+rename table mysql.event to mysql.ev_bk;
+flush tables;
+The --upgrade-system-tables option was used, user tables won't be touched.
+MySQL upgrade detected
+Phase 1/6: Checking and upgrading mysql database
+Processing databases
+mysql
+mysql.column_stats OK
+mysql.columns_priv OK
+mysql.db OK
+mysql.ev_bk OK
+mysql.event OK
+mysql.func OK
+mysql.gtid_slave_pos OK
+mysql.help_category OK
+mysql.help_keyword OK
+mysql.help_relation OK
+mysql.help_topic OK
+mysql.host OK
+mysql.index_stats OK
+mysql.innodb_index_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+mysql.innodb_table_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+mysql.plugin OK
+mysql.proc OK
+mysql.procs_priv OK
+mysql.proxies_priv OK
+mysql.roles_mapping OK
+mysql.servers OK
+mysql.table_stats OK
+mysql.tables_priv OK
+mysql.time_zone OK
+mysql.time_zone_leap_second OK
+mysql.time_zone_name OK
+mysql.time_zone_transition OK
+mysql.time_zone_transition_type OK
+mysql.user OK
+
+Repairing tables
+mysql.innodb_index_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+mysql.innodb_table_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+Phase 2/6: Fixing views from mysql
+test.v1 OK
+test.v2 OK
+test.v3 OK
+Phase 3/6: Running 'mysql_fix_privilege_tables'
+Phase 4/6: Fixing table and database names ... Skipped
+Phase 5/6: Checking and upgrading tables... Skipped
+Phase 6/6: Running 'FLUSH PRIVILEGES'
+OK
+drop table mysql.event;
+rename table mysql.ev_bk to mysql.event;
+drop view v1,v2,v3;
drop table t1;
diff --git a/mysql-test/r/mysqlcheck.result b/mysql-test/r/mysqlcheck.result
index b4bcdc495ae..66e23c18355 100644
--- a/mysql-test/r/mysqlcheck.result
+++ b/mysql-test/r/mysqlcheck.result
@@ -347,6 +347,9 @@ CREATE TABLE test.`t.1` (id int);
mysqlcheck test t.1
test.t.1 OK
drop table test.`t.1`;
+#
+# MDEV-8123 mysqlcheck: new --process-views option conflicts with --quick, --extended and such
+#
create view v1 as select 1;
mysqlcheck --process-views test
test.v1 OK
@@ -361,6 +364,9 @@ test.v1 OK
mysqlcheck --process-views --check-upgrade test
test.v1 OK
drop view v1;
+#
+# MDEV-8124 mysqlcheck: --auto-repair runs REPAIR TABLE instead of REPAIR VIEW on views
+#
create table t1(a int);
mysqlcheck --process-views --check-upgrade --auto-repair test
test.t1 OK
@@ -370,3 +376,16 @@ Repairing views
test.v1 OK
drop view v1;
drop table t1;
+#
+#MDEV-7384 [PATCH] add PERSISENT FOR ALL option to mysqlanalyze/mysqlcheck
+#
+create table t1(a int);
+insert into t1 (a) values (1), (2), (3);
+select * from mysql.column_stats;
+db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
+test.t1 Engine-independent statistics collected
+status : OK
+select * from mysql.column_stats where db_name = 'test' and table_name = 't1';
+db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
+test t1 a 1 3 0.0000 4.0000 1.0000 0 NULL NULL
+drop table t1;
diff --git a/mysql-test/r/partition_pruning.result b/mysql-test/r/partition_pruning.result
index e52c2c7d886..65b788a7d1b 100644
--- a/mysql-test/r/partition_pruning.result
+++ b/mysql-test/r/partition_pruning.result
@@ -3467,3 +3467,21 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
1 PRIMARY t2 p_1000 ref PRIMARY PRIMARY 8 const 2 Using index
1 PRIMARY t1 p_1000 ALL PRIMARY NULL NULL NULL 6 Using where; Using join buffer (flat, BNL join)
drop table t1,t2;
+#
+# MDEV-9505: Valgrind failure in SEL_ARG::store_min,find_used_partitions,...
+#
+create table t1 (a int, b char(10), c varchar(5), d int)
+partition by range columns(a,b,c)
+subpartition by key (c,d)
+subpartitions 3
+( partition p0 values less than (1,'abc','abc'),
+partition p1 values less than (2,'abc','abc'),
+partition p2 values less than (3,'abc','abc'),
+partition p3 values less than (4,'abc','abc')
+);
+insert into t1 values (1,'a','b',1),(2,'a','b',2),(3,'a','b',3);
+select * from t1 where (a = 1 AND b < 'd' AND (c = 'b' OR (c = 'c' AND d = 1)) OR
+(a = 1 AND b >= 'a' AND (c = 'c' OR (c = 'd' AND d = 2))));
+a b c d
+1 a b 1
+drop table t1;
diff --git a/mysql-test/r/second_frac-9175.result b/mysql-test/r/second_frac-9175.result
new file mode 100644
index 00000000000..dbf268b5c3b
--- /dev/null
+++ b/mysql-test/r/second_frac-9175.result
@@ -0,0 +1,13 @@
+select timestampdiff(microsecond,'2000-01-01 00:00:00','2001-01-01 00:00:00.123456');
+timestampdiff(microsecond,'2000-01-01 00:00:00','2001-01-01 00:00:00.123456')
+31622400123456
+explain extended select timestampdiff(microsecond,'2000-01-01 00:00:00','2001-01-01 00:00:00.123456');
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+Warnings:
+Note 1003 select timestampdiff(MICROSECOND,'2000-01-01 00:00:00','2001-01-01 00:00:00.123456') AS `timestampdiff(microsecond,'2000-01-01 00:00:00','2001-01-01 00:00:00.123456')`
+create view v1 as select timestampdiff(microsecond,'2000-01-01 00:00:00','2001-01-01 00:00:00.123456');
+select * from v1;
+Name_exp_1
+31622400123456
+drop view v1;
diff --git a/mysql-test/r/select_found.result b/mysql-test/r/select_found.result
index 92758fa134b..7b38515cf70 100644
--- a/mysql-test/r/select_found.result
+++ b/mysql-test/r/select_found.result
@@ -348,3 +348,18 @@ select found_rows();
found_rows()
75
drop table t1;
+create table t1(c1 int);
+insert into t1 values(1),(2),(3),(4),(5);
+select * from t1 order by c1 limit 2,1;
+c1
+3
+select found_rows();
+found_rows()
+3
+select sql_calc_found_rows * from t1 order by c1 limit 2,1;
+c1
+3
+select found_rows();
+found_rows()
+5
+drop table t1;
diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result
index cf50bf49004..471576e563f 100644
--- a/mysql-test/r/sp.result
+++ b/mysql-test/r/sp.result
@@ -4323,57 +4323,57 @@ test.t1 repair status OK
test.t2 repair status OK
test.t3 repair status OK
test.v1 repair Error 'test.v1' is not BASE TABLE
-test.v1 repair error Corrupt
+test.v1 repair status Operation failed
Table Op Msg_type Msg_text
test.t1 optimize status OK
test.t2 optimize status OK
test.t3 optimize status OK
test.v1 optimize Error 'test.v1' is not BASE TABLE
-test.v1 optimize error Corrupt
+test.v1 optimize status Operation failed
Table Op Msg_type Msg_text
test.t1 analyze status Table is already up to date
test.t2 analyze status Table is already up to date
test.t3 analyze status Table is already up to date
test.v1 analyze Error 'test.v1' is not BASE TABLE
-test.v1 analyze error Corrupt
+test.v1 analyze status Operation failed
call bug13012()|
Table Op Msg_type Msg_text
test.t1 repair status OK
test.t2 repair status OK
test.t3 repair status OK
test.v1 repair Error 'test.v1' is not BASE TABLE
-test.v1 repair error Corrupt
+test.v1 repair status Operation failed
Table Op Msg_type Msg_text
test.t1 optimize status OK
test.t2 optimize status OK
test.t3 optimize status OK
test.v1 optimize Error 'test.v1' is not BASE TABLE
-test.v1 optimize error Corrupt
+test.v1 optimize status Operation failed
Table Op Msg_type Msg_text
test.t1 analyze status Table is already up to date
test.t2 analyze status Table is already up to date
test.t3 analyze status Table is already up to date
test.v1 analyze Error 'test.v1' is not BASE TABLE
-test.v1 analyze error Corrupt
+test.v1 analyze status Operation failed
call bug13012()|
Table Op Msg_type Msg_text
test.t1 repair status OK
test.t2 repair status OK
test.t3 repair status OK
test.v1 repair Error 'test.v1' is not BASE TABLE
-test.v1 repair error Corrupt
+test.v1 repair status Operation failed
Table Op Msg_type Msg_text
test.t1 optimize status OK
test.t2 optimize status OK
test.t3 optimize status OK
test.v1 optimize Error 'test.v1' is not BASE TABLE
-test.v1 optimize error Corrupt
+test.v1 optimize status Operation failed
Table Op Msg_type Msg_text
test.t1 analyze status Table is already up to date
test.t2 analyze status Table is already up to date
test.t3 analyze status Table is already up to date
test.v1 analyze Error 'test.v1' is not BASE TABLE
-test.v1 analyze error Corrupt
+test.v1 analyze status Operation failed
drop procedure bug13012|
drop view v1|
select * from t1 order by data|
diff --git a/mysql-test/r/ssl_cert_verify.result b/mysql-test/r/ssl_cert_verify.result
new file mode 100644
index 00000000000..1da77329509
--- /dev/null
+++ b/mysql-test/r/ssl_cert_verify.result
@@ -0,0 +1,5 @@
+#T1: Host name (/CN=localhost/) as OU name in the server certificate, server certificate verification should fail.
+#T2: Host name (localhost) as common name in the server certificate, server certificate verification should pass.
+Variable_name Value
+Ssl_version TLS_VERSION
+# restart server using restart
diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result
index f49a9bc4aa0..fa6a0624dcb 100644
--- a/mysql-test/r/subselect.result
+++ b/mysql-test/r/subselect.result
@@ -7086,6 +7086,20 @@ NULL
deallocate prepare stmt;
drop table t1,t2,t3,t4;
#
+# MDEV-7122
+# Assertion `0' failed in subselect_hash_sj_engine::init
+#
+SET SESSION big_tables=1;
+CREATE TABLE t1(a char(255) DEFAULT '', KEY(a(10))) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
+INSERT INTO t1 VALUES(0),(0),(0);
+SELECT * FROM t1 WHERE a IN(SELECT MIN(a) FROM t1);
+a
+0
+0
+0
+DROP TABLE t1;
+SET SESSION big_tables=0;
+#
# MDEV-7930: Assertion `table_share->tmp_table != NO_TMP_TABLE ||
# m_lock_type != 2' failed in handler::ha_index_read_map
#
diff --git a/mysql-test/r/subselect_extra_no_semijoin.result b/mysql-test/r/subselect_extra_no_semijoin.result
index e5b36055c91..79bca388181 100644
--- a/mysql-test/r/subselect_extra_no_semijoin.result
+++ b/mysql-test/r/subselect_extra_no_semijoin.result
@@ -349,9 +349,9 @@ WHERE t.a IN (SELECT b FROM t1);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 system NULL NULL NULL NULL 1 100.00
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 100.00 Using where
-3 MATERIALIZED t1 system NULL NULL NULL NULL 1 100.00
+3 DEPENDENT SUBQUERY t1 system NULL NULL NULL NULL 1 100.00
Warnings:
-Note 1003 select `test`.`t2`.`a` AS `a`,0 AS `a`,0 AS `b` from `test`.`t2` where <expr_cache><0>(<in_optimizer>(0,0 in ( <materialize> (select 0 from dual ), <primary_index_lookup>(0 in <temporary table> on distinct_key where ((0 = `<subquery3>`.`b`))))))
+Note 1003 select `test`.`t2`.`a` AS `a`,0 AS `a`,0 AS `b` from `test`.`t2` where <expr_cache><0>(<in_optimizer>(0,<exists>(select 0 from dual where (<cache>(0) = 0))))
SELECT * FROM t2 RIGHT JOIN v1 AS t ON t.a != 0
WHERE t.a IN (SELECT b FROM t1);
a a b
@@ -362,9 +362,9 @@ WHERE t.a IN (SELECT b FROM t1);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 system NULL NULL NULL NULL 1 100.00
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 100.00 Using where
-2 MATERIALIZED t1 system NULL NULL NULL NULL 1 100.00
+2 DEPENDENT SUBQUERY t1 system NULL NULL NULL NULL 1 100.00
Warnings:
-Note 1003 select `test`.`t2`.`a` AS `a`,0 AS `a`,0 AS `b` from `test`.`t2` where <expr_cache><0>(<in_optimizer>(0,0 in ( <materialize> (select 0 from dual ), <primary_index_lookup>(0 in <temporary table> on distinct_key where ((0 = `<subquery2>`.`b`))))))
+Note 1003 select `test`.`t2`.`a` AS `a`,0 AS `a`,0 AS `b` from `test`.`t2` where <expr_cache><0>(<in_optimizer>(0,<exists>(select 0 from dual where (<cache>(0) = 0))))
DROP VIEW v1;
DROP TABLE t1,t2;
#
diff --git a/mysql-test/r/subselect_no_exists_to_in.result b/mysql-test/r/subselect_no_exists_to_in.result
index f6434c8fe4c..012d7a80610 100644
--- a/mysql-test/r/subselect_no_exists_to_in.result
+++ b/mysql-test/r/subselect_no_exists_to_in.result
@@ -7086,6 +7086,20 @@ NULL
deallocate prepare stmt;
drop table t1,t2,t3,t4;
#
+# MDEV-7122
+# Assertion `0' failed in subselect_hash_sj_engine::init
+#
+SET SESSION big_tables=1;
+CREATE TABLE t1(a char(255) DEFAULT '', KEY(a(10))) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
+INSERT INTO t1 VALUES(0),(0),(0);
+SELECT * FROM t1 WHERE a IN(SELECT MIN(a) FROM t1);
+a
+0
+0
+0
+DROP TABLE t1;
+SET SESSION big_tables=0;
+#
# MDEV-7930: Assertion `table_share->tmp_table != NO_TMP_TABLE ||
# m_lock_type != 2' failed in handler::ha_index_read_map
#
diff --git a/mysql-test/r/subselect_no_mat.result b/mysql-test/r/subselect_no_mat.result
index 49ad0ed4037..e83697fcb4f 100644
--- a/mysql-test/r/subselect_no_mat.result
+++ b/mysql-test/r/subselect_no_mat.result
@@ -7079,6 +7079,20 @@ NULL
deallocate prepare stmt;
drop table t1,t2,t3,t4;
#
+# MDEV-7122
+# Assertion `0' failed in subselect_hash_sj_engine::init
+#
+SET SESSION big_tables=1;
+CREATE TABLE t1(a char(255) DEFAULT '', KEY(a(10))) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
+INSERT INTO t1 VALUES(0),(0),(0);
+SELECT * FROM t1 WHERE a IN(SELECT MIN(a) FROM t1);
+a
+0
+0
+0
+DROP TABLE t1;
+SET SESSION big_tables=0;
+#
# MDEV-7930: Assertion `table_share->tmp_table != NO_TMP_TABLE ||
# m_lock_type != 2' failed in handler::ha_index_read_map
#
diff --git a/mysql-test/r/subselect_no_opts.result b/mysql-test/r/subselect_no_opts.result
index 2122747d262..c620f788cf7 100644
--- a/mysql-test/r/subselect_no_opts.result
+++ b/mysql-test/r/subselect_no_opts.result
@@ -7077,6 +7077,20 @@ NULL
deallocate prepare stmt;
drop table t1,t2,t3,t4;
#
+# MDEV-7122
+# Assertion `0' failed in subselect_hash_sj_engine::init
+#
+SET SESSION big_tables=1;
+CREATE TABLE t1(a char(255) DEFAULT '', KEY(a(10))) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
+INSERT INTO t1 VALUES(0),(0),(0);
+SELECT * FROM t1 WHERE a IN(SELECT MIN(a) FROM t1);
+a
+0
+0
+0
+DROP TABLE t1;
+SET SESSION big_tables=0;
+#
# MDEV-7930: Assertion `table_share->tmp_table != NO_TMP_TABLE ||
# m_lock_type != 2' failed in handler::ha_index_read_map
#
diff --git a/mysql-test/r/subselect_no_scache.result b/mysql-test/r/subselect_no_scache.result
index a1c468ba334..b2b2518bdd3 100644
--- a/mysql-test/r/subselect_no_scache.result
+++ b/mysql-test/r/subselect_no_scache.result
@@ -7092,6 +7092,20 @@ NULL
deallocate prepare stmt;
drop table t1,t2,t3,t4;
#
+# MDEV-7122
+# Assertion `0' failed in subselect_hash_sj_engine::init
+#
+SET SESSION big_tables=1;
+CREATE TABLE t1(a char(255) DEFAULT '', KEY(a(10))) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
+INSERT INTO t1 VALUES(0),(0),(0);
+SELECT * FROM t1 WHERE a IN(SELECT MIN(a) FROM t1);
+a
+0
+0
+0
+DROP TABLE t1;
+SET SESSION big_tables=0;
+#
# MDEV-7930: Assertion `table_share->tmp_table != NO_TMP_TABLE ||
# m_lock_type != 2' failed in handler::ha_index_read_map
#
diff --git a/mysql-test/r/subselect_no_semijoin.result b/mysql-test/r/subselect_no_semijoin.result
index 168908aa356..2bd82dffd36 100644
--- a/mysql-test/r/subselect_no_semijoin.result
+++ b/mysql-test/r/subselect_no_semijoin.result
@@ -7077,6 +7077,20 @@ NULL
deallocate prepare stmt;
drop table t1,t2,t3,t4;
#
+# MDEV-7122
+# Assertion `0' failed in subselect_hash_sj_engine::init
+#
+SET SESSION big_tables=1;
+CREATE TABLE t1(a char(255) DEFAULT '', KEY(a(10))) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
+INSERT INTO t1 VALUES(0),(0),(0);
+SELECT * FROM t1 WHERE a IN(SELECT MIN(a) FROM t1);
+a
+0
+0
+0
+DROP TABLE t1;
+SET SESSION big_tables=0;
+#
# MDEV-7930: Assertion `table_share->tmp_table != NO_TMP_TABLE ||
# m_lock_type != 2' failed in handler::ha_index_read_map
#
diff --git a/mysql-test/r/subselect_sj.result b/mysql-test/r/subselect_sj.result
index 46c799c4f6e..3ca3f0d35fb 100644
--- a/mysql-test/r/subselect_sj.result
+++ b/mysql-test/r/subselect_sj.result
@@ -2997,4 +2997,69 @@ explain
select 1 from t1 where _cp932 "1" in (select '1' from t1);
ERROR HY000: Illegal mix of collations (cp932_japanese_ci,COERCIBLE) and (latin1_swedish_ci,COERCIBLE) for operation '='
drop table t1;
+#
+# MDEV-7823: Server crashes in next_depth_first_tab on nested IN clauses with SQ inside
+#
+set @tmp_mdev7823=@@optimizer_switch;
+set optimizer_switch=default;
+CREATE TABLE t1 (f1 INT);
+INSERT INTO t1 VALUES (1);
+CREATE TABLE t2 (f2 INT, KEY(f2));
+INSERT INTO t2 VALUES (8),(0);
+CREATE TABLE t3 (f3 INT);
+INSERT INTO t3 VALUES (1),(2);
+CREATE TABLE t4 (f4 INT);
+INSERT INTO t4 VALUES (0),(5);
+explain
+SELECT * FROM t1, t2, t3 WHERE f2 IN ( f1 IN ( SELECT f4 FROM t4 ) );
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 system NULL NULL NULL NULL 1
+1 PRIMARY t2 ref f2 f2 5 const 0 Using where; Using index
+1 PRIMARY t3 ALL NULL NULL NULL NULL 2 Using join buffer (flat, BNL join)
+2 DEPENDENT SUBQUERY t4 ALL NULL NULL NULL NULL 2 Using where
+SELECT * FROM t1, t2, t3 WHERE f2 IN ( f1 IN ( SELECT f4 FROM t4 ) );
+f1 f2 f3
+1 0 1
+1 0 2
+drop table t1,t2,t3,t4;
+set optimizer_switch= @tmp_mdev7823;
+#
+# MDEV-6859: scalar subqueries in a comparison produced unexpected result
+#
+set @tmp_mdev6859=@@optimizer_switch;
+set optimizer_switch=default;
+CREATE TABLE t1 (
+project_number varchar(50) NOT NULL,
+PRIMARY KEY (project_number)
+) ENGINE=MyISAM;
+INSERT INTO t1 (project_number) VALUES ('aaa'),('bbb');
+CREATE TABLE t2 (
+id int(10) unsigned NOT NULL AUTO_INCREMENT,
+project_number varchar(50) NOT NULL,
+history_date date NOT NULL,
+country varchar(50) NOT NULL,
+PRIMARY KEY (id)
+) ENGINE=MyISAM;
+INSERT INTO t2 (id, project_number, history_date, country) VALUES
+(1, 'aaa', '2014-08-09', 'france'),(2, 'aaa', '2014-09-09', 'singapore');
+CREATE TABLE t3 (
+region varchar(50) NOT NULL,
+country varchar(50) NOT NULL
+) ENGINE=MyISAM;
+INSERT INTO t3 (region, country) VALUES ('apac', 'singapore'),('eame', 'france');
+SELECT SQL_NO_CACHE a.project_number
+FROM t1 a
+WHERE ( SELECT z.country
+FROM t2 z
+WHERE z.project_number = a.project_number AND z.history_date <= '2014-09-01'
+ORDER BY z.id DESC LIMIT 1
+) IN (
+SELECT r.country
+FROM t3 r
+WHERE r.region = 'eame'
+ );
+project_number
+aaa
+drop table t1, t2, t3;
+set optimizer_switch= @tmp_mdev6859;
set optimizer_switch=@subselect_sj_tmp;
diff --git a/mysql-test/r/subselect_sj_jcl6.result b/mysql-test/r/subselect_sj_jcl6.result
index ba582d7e008..ed6bf8bc11b 100644
--- a/mysql-test/r/subselect_sj_jcl6.result
+++ b/mysql-test/r/subselect_sj_jcl6.result
@@ -3011,6 +3011,71 @@ explain
select 1 from t1 where _cp932 "1" in (select '1' from t1);
ERROR HY000: Illegal mix of collations (cp932_japanese_ci,COERCIBLE) and (latin1_swedish_ci,COERCIBLE) for operation '='
drop table t1;
+#
+# MDEV-7823: Server crashes in next_depth_first_tab on nested IN clauses with SQ inside
+#
+set @tmp_mdev7823=@@optimizer_switch;
+set optimizer_switch=default;
+CREATE TABLE t1 (f1 INT);
+INSERT INTO t1 VALUES (1);
+CREATE TABLE t2 (f2 INT, KEY(f2));
+INSERT INTO t2 VALUES (8),(0);
+CREATE TABLE t3 (f3 INT);
+INSERT INTO t3 VALUES (1),(2);
+CREATE TABLE t4 (f4 INT);
+INSERT INTO t4 VALUES (0),(5);
+explain
+SELECT * FROM t1, t2, t3 WHERE f2 IN ( f1 IN ( SELECT f4 FROM t4 ) );
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 system NULL NULL NULL NULL 1
+1 PRIMARY t2 ref f2 f2 5 const 0 Using where; Using index
+1 PRIMARY t3 ALL NULL NULL NULL NULL 2 Using join buffer (flat, BNL join)
+2 DEPENDENT SUBQUERY t4 ALL NULL NULL NULL NULL 2 Using where
+SELECT * FROM t1, t2, t3 WHERE f2 IN ( f1 IN ( SELECT f4 FROM t4 ) );
+f1 f2 f3
+1 0 1
+1 0 2
+drop table t1,t2,t3,t4;
+set optimizer_switch= @tmp_mdev7823;
+#
+# MDEV-6859: scalar subqueries in a comparison produced unexpected result
+#
+set @tmp_mdev6859=@@optimizer_switch;
+set optimizer_switch=default;
+CREATE TABLE t1 (
+project_number varchar(50) NOT NULL,
+PRIMARY KEY (project_number)
+) ENGINE=MyISAM;
+INSERT INTO t1 (project_number) VALUES ('aaa'),('bbb');
+CREATE TABLE t2 (
+id int(10) unsigned NOT NULL AUTO_INCREMENT,
+project_number varchar(50) NOT NULL,
+history_date date NOT NULL,
+country varchar(50) NOT NULL,
+PRIMARY KEY (id)
+) ENGINE=MyISAM;
+INSERT INTO t2 (id, project_number, history_date, country) VALUES
+(1, 'aaa', '2014-08-09', 'france'),(2, 'aaa', '2014-09-09', 'singapore');
+CREATE TABLE t3 (
+region varchar(50) NOT NULL,
+country varchar(50) NOT NULL
+) ENGINE=MyISAM;
+INSERT INTO t3 (region, country) VALUES ('apac', 'singapore'),('eame', 'france');
+SELECT SQL_NO_CACHE a.project_number
+FROM t1 a
+WHERE ( SELECT z.country
+FROM t2 z
+WHERE z.project_number = a.project_number AND z.history_date <= '2014-09-01'
+ORDER BY z.id DESC LIMIT 1
+) IN (
+SELECT r.country
+FROM t3 r
+WHERE r.region = 'eame'
+ );
+project_number
+aaa
+drop table t1, t2, t3;
+set optimizer_switch= @tmp_mdev6859;
set optimizer_switch=@subselect_sj_tmp;
#
# BUG#49129: Wrong result with IN-subquery with join_cache_level=6 and firstmatch=off
diff --git a/mysql-test/r/type_blob.result b/mysql-test/r/type_blob.result
index ff4ebd6b15c..f7816208887 100644
--- a/mysql-test/r/type_blob.result
+++ b/mysql-test/r/type_blob.result
@@ -1000,9 +1000,42 @@ COUNT(*)
DROP FUNCTION f1;
DROP TABLE t1;
End of 5.1 tests
+#
+# Start of 5.5 tests
+#
CREATE TABLE t1 ( f1 blob, f2 blob );
INSERT INTO t1 VALUES ('','');
SELECT f1,f2,"found row" FROM t1 WHERE f1 = f2 ;
f1 f2 found row
found row
DROP TABLE t1;
+#
+# MDEV-9319 ALTER from a bigger to a smaller blob type truncates too much data
+#
+CREATE TABLE t1 (a MEDIUMBLOB);
+INSERT INTO t1 VALUES (REPEAT(0x61,128000));
+SELECT LENGTH(a) FROM t1;
+LENGTH(a)
+128000
+ALTER TABLE t1 MODIFY a BLOB;
+Warnings:
+Warning 1265 Data truncated for column 'a' at row 1
+SELECT LENGTH(a) FROM t1;
+LENGTH(a)
+65535
+DROP TABLE t1;
+CREATE TABLE t1 (a BLOB);
+INSERT INTO t1 VALUES (REPEAT(0x61,65000));
+SELECT LENGTH(a) FROM t1;
+LENGTH(a)
+65000
+ALTER TABLE t1 MODIFY a TINYBLOB;
+Warnings:
+Warning 1265 Data truncated for column 'a' at row 1
+SELECT LENGTH(a) FROM t1;
+LENGTH(a)
+255
+DROP TABLE t1;
+#
+# End of 5.5 tests
+#
diff --git a/mysql-test/r/type_date.result b/mysql-test/r/type_date.result
index 398f7b83bc9..66c9e7e48ef 100644
--- a/mysql-test/r/type_date.result
+++ b/mysql-test/r/type_date.result
@@ -438,3 +438,12 @@ id select_type table type possible_keys key key_len ref rows Extra
select 1 from t1 as t1_0 inner join t1 as t2 on (t1_0.a <=> now()) join t1 on 1;
1
drop table t1;
+#
+# MDEV-9511 Valgrind warnings 'Invalid read' in Field_newdate::cmp and Field_newdate::val_str
+#
+CREATE TABLE t1 (f1 DATE, f2 VARCHAR(1));
+INSERT INTO t1 VALUES ('2003-04-27','a'),('1900-01-01','a');
+SELECT GROUP_CONCAT(f2, IF(f1, f2, f1), f1 ORDER BY 2,1,3) FROM t1;
+GROUP_CONCAT(f2, IF(f1, f2, f1), f1 ORDER BY 2,1,3)
+aa1900-01-01,aa2003-04-27
+DROP TABLE t1;
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result
index aa67013757f..96c35d9dcb3 100644
--- a/mysql-test/r/view.result
+++ b/mysql-test/r/view.result
@@ -2422,28 +2422,28 @@ CREATE VIEW v1 AS SELECT id FROM t1;
OPTIMIZE TABLE v1;
Table Op Msg_type Msg_text
test.v1 optimize Error 'test.v1' is not BASE TABLE
-test.v1 optimize error Corrupt
+test.v1 optimize status Operation failed
ANALYZE TABLE v1;
Table Op Msg_type Msg_text
test.v1 analyze Error 'test.v1' is not BASE TABLE
-test.v1 analyze error Corrupt
+test.v1 analyze status Operation failed
REPAIR TABLE v1;
Table Op Msg_type Msg_text
test.v1 repair Error 'test.v1' is not BASE TABLE
-test.v1 repair error Corrupt
+test.v1 repair status Operation failed
DROP TABLE t1;
OPTIMIZE TABLE v1;
Table Op Msg_type Msg_text
test.v1 optimize Error 'test.v1' is not BASE TABLE
-test.v1 optimize error Corrupt
+test.v1 optimize status Operation failed
ANALYZE TABLE v1;
Table Op Msg_type Msg_text
test.v1 analyze Error 'test.v1' is not BASE TABLE
-test.v1 analyze error Corrupt
+test.v1 analyze status Operation failed
REPAIR TABLE v1;
Table Op Msg_type Msg_text
test.v1 repair Error 'test.v1' is not BASE TABLE
-test.v1 repair error Corrupt
+test.v1 repair status Operation failed
DROP VIEW v1;
create definer = current_user() sql security invoker view v1 as select 1;
show create view v1;
@@ -5510,6 +5510,14 @@ execute stmt;
deallocate prepare stmt;
drop view v1,v2;
drop table `t1`;
+create table t1 (a int, b int);
+create view v1 as select a+b from t1;
+alter table v1 check partition p1;
+Table Op Msg_type Msg_text
+test.v1 check Error 'test.v1' is not BASE TABLE
+test.v1 check status Operation failed
+drop view v1;
+drop table t1;
# -----------------------------------------------------------------
# -- End of 5.5 tests.
# -----------------------------------------------------------------
diff --git a/mysql-test/std_data/ca-cert-verify.pem b/mysql-test/std_data/ca-cert-verify.pem
new file mode 100644
index 00000000000..21d6264a0ad
--- /dev/null
+++ b/mysql-test/std_data/ca-cert-verify.pem
@@ -0,0 +1,20 @@
+-----BEGIN CERTIFICATE-----
+MIIDWzCCAkOgAwIBAgIJAO/QdKLEDQdXMA0GCSqGSIb3DQEBCwUAMEQxCzAJBgNV
+BAYTAklOMREwDwYDVQQIDAhLYXJuYXRrYTESMBAGA1UEBwwJQmFuZ2Fsb3JlMQ4w
+DAYDVQQKDAVNeVNRTDAeFw0xNjAxMDUxMDA1MDhaFw0yNTExMTMxMDA1MDhaMEQx
+CzAJBgNVBAYTAklOMREwDwYDVQQIDAhLYXJuYXRrYTESMBAGA1UEBwwJQmFuZ2Fs
+b3JlMQ4wDAYDVQQKDAVNeVNRTDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
+ggEBAKdOCuS2CzfBTJ2x8SAzY0J7cYJfNJvMDF1cvANnhkIhtnkWt/HZ5DJ9NxeX
+q5h7FJLAi4gddqdk/tvQJw0V6gZepJr/mKVnMPivF5+oHPc9ZJQMX6B3FBNwWylm
+ACd5GKx8I/H/MXyuhQTcoV//Ab+2pI8RHeYbBsm3lHH+tX7bRU6mUFjneqMpiCkb
+JHt6BWZiWR10O6pMuGQ9+dDdsLhEV1fj3CctEPwW6rs4IZzD8xl5n+8cy7qu6eYH
+Wt/snwsTzkrufeMRqTtqelxON9eoQwYOR1oH3vNEVlcbuoJAvaWOqBROUBdf12SP
+TYSdP9nlRh7lTKQOywN4kYt6LqUCAwEAAaNQME4wHQYDVR0OBBYEFJ4c9tKaUU0P
+EjBq5G207jjXI7RAMB8GA1UdIwQYMBaAFJ4c9tKaUU0PEjBq5G207jjXI7RAMAwG
+A1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBABRnUyj21oFi0SGJg/K5+8Lc
+4n6OwVU/NgLOysIB0baIP/Rqeaze59xG/v9FPQgBlWcJK3RabOywx5bxAxdcus+1
+yp5j4h37Qq1/qkgqmevvdSAPa0OBQbLb+58/naV+ywUpCYZ6flLdCMH3fXuDSlSq
+qrCznextjojtWbnzrBmCmJmXWGd2gSaJDvb90ZZp/Elt3vN1sgjW0M/JEkb4MJ1r
+6nfD/FHr2lUwBHm2yk7Blovx7x4d/Ip3pglk63cNO/Rn0SBTdoVDS2LB9du3Phq2
+TZiL3NrRMGUNwmdaavyrJxaPq5D+Sfa4LYP3MMYD4KhLogNzIl299n5joyizlJw=
+-----END CERTIFICATE-----
diff --git a/mysql-test/std_data/server-cert-verify-fail.pem b/mysql-test/std_data/server-cert-verify-fail.pem
new file mode 100644
index 00000000000..4203425a344
--- /dev/null
+++ b/mysql-test/std_data/server-cert-verify-fail.pem
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIDJzCCAg8CAQEwDQYJKoZIhvcNAQELBQAwRDELMAkGA1UEBhMCSU4xETAPBgNV
+BAgMCEthcm5hdGthMRIwEAYDVQQHDAlCYW5nYWxvcmUxDjAMBgNVBAoMBU15U1FM
+MB4XDTE2MDEwNTEwMDgyN1oXDTI1MTExMzEwMDgyN1owbzELMAkGA1UEBhMCSU4x
+EjAQBgNVBAgMCTpLYXJuYXRrYTETMBEGA1UEBwwKOkJhbmdhbG9yZTEPMA0GA1UE
+CgwGOk15U1FMMRcwFQYDVQQLDA4vQ049bG9jYWxob3N0LzENMAsGA1UEAwwEZmFp
+bDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3wnWuJodzZYq9TAJRm
+HU7995FA3TEWdUinYTgGP79aTVQ4M9aeINlB6whWXOI8seh9Ja7C6kMzqOgYbgCl
+WlDPAVJWktFYeWXOLxbpzh1KWkS6jBkWT02t7H7JcYbil7xjlJUxLz4UOOUDUDIP
+6yqdA9VE3osESttjzj57Zm2xPqzbIHVJfORn7EexH4pryS7439p6i4XtfL31NJ8V
+07M3j3a8GqbcEqXYvcUCrLnywDQ1igP817b6ta52nbgYWiqdn0mJs535UJ/p/rSl
+D4Ae/6G3BSEY7whir6xY6vsd4KJ6w+wRCHnY0ky6OdDJVJLH1iqh7si7P3RBGkxw
+Y7MCAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAggbw1jj2b7H5KDdeGJGIoOGkQAcs
+GNSJussCfdk7qnzYXKmjyNppC86jjaOrXona5f+SNCuujdu86Tv8V69EH57k4lUc
+DW7J4AD3vUb/tBzB0tsI/76Z4gm1XoCsnCGGpWd8GQAg/QNn/ZfJB2Vb/9ObN6rH
+0HV7ouB6OGZSsb71+grKiN6mDyB1lZynCGvqBxOCKFISfcRbCNFHo/pONlHaNGPE
+vjDH1bPZbEHj8owYgkdcQe0a8EbJYeQfm6fH8V8bmUcG7N60DrCnq4l1qwwVkh1S
+7RpIDgrWkU+esIIdYZIIbtDxQP1Sm7kUh++7b+bcHnyw3KtDVSCw7MIedA==
+-----END CERTIFICATE-----
diff --git a/mysql-test/std_data/server-cert-verify-pass.pem b/mysql-test/std_data/server-cert-verify-pass.pem
new file mode 100644
index 00000000000..f8780f1f94e
--- /dev/null
+++ b/mysql-test/std_data/server-cert-verify-pass.pem
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIDEzCCAfsCAQEwDQYJKoZIhvcNAQELBQAwRDELMAkGA1UEBhMCSU4xETAPBgNV
+BAgMCEthcm5hdGthMRIwEAYDVQQHDAlCYW5nYWxvcmUxDjAMBgNVBAoMBU15U1FM
+MB4XDTE2MDEwNTEwMDU1OVoXDTI1MTExMzEwMDU1OVowWzELMAkGA1UEBhMCSU4x
+EjAQBgNVBAgMCTpLYXJuYXRrYTETMBEGA1UEBwwKOkJhbmdhbG9yZTEPMA0GA1UE
+CgwGOk15U1FMMRIwEAYDVQQDDAlsb2NhbGhvc3QwggEiMA0GCSqGSIb3DQEBAQUA
+A4IBDwAwggEKAoIBAQDAmkbUwDe+nrqL8A8uwlIZk74HHCDjUAWrskKF9leEIQsB
+5exFZ8JEo1u6mdR4laQWsxizGdTPqIEidkDyyEMh4+joHgyQEPD/G3rFVW8yEFHb
+42O04O96BEPFXNPDRuX3MxI+lGbYDjxTS/WhVub4/3SqLjC28FJmEUXIHA0/A+c5
+hlYXK0u+aPAqXxHIjBgB4BxxHXZKqecmvR3LhXoVmhJmndsVfKajB27nDKc8/OTI
+H2SXb6h3nRPDXRfwB/C5i+004tEsVeIgkYshcCgLSyDdeVieUP2pm3EAmDSjmtLF
+6CgY/EBSfH+JCKFUk75bA4k8CCGzBfIeOcsKHwgFAgMBAAEwDQYJKoZIhvcNAQEL
+BQADggEBAInDuHtDkeT6dkWmRJCP56c4xiQqib2QuYUuMSrAhf07xlLHc6iHnD2X
+hCWCrja6uwF90DnPjeouKMAUe5txq/uKA8/Y/NfXN6nPiAeHLI0qnTv7Mr9TQ8zU
+DNDwRz6onlI2cS4GhrwAnlpiaxu7AjMUWHtfBFGFrgn3PawjDQpsBZNcxw1QsLc0
+E0hFrWLOd0vDETEhoRge88N7a0jqK0Rd9cvRWnvjI+IsjQMLZzKufivIHPzI9K+9
+Wtp8iRHcaBr5DpsBjgsO7dqVRbsNyaWsdHdLt+CQSGXpv7P6fq3K6nJFTBeIgSfS
+gflrHVKYZRkKDDDpX4yHNdnIqrvy4RU=
+-----END CERTIFICATE-----
diff --git a/mysql-test/std_data/server-key-verify-fail.pem b/mysql-test/std_data/server-key-verify-fail.pem
new file mode 100644
index 00000000000..af1ae1e3ae1
--- /dev/null
+++ b/mysql-test/std_data/server-key-verify-fail.pem
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpQIBAAKCAQEAvfCda4mh3Nlir1MAlGYdTv33kUDdMRZ1SKdhOAY/v1pNVDgz
+1p4g2UHrCFZc4jyx6H0lrsLqQzOo6BhuAKVaUM8BUlaS0Vh5Zc4vFunOHUpaRLqM
+GRZPTa3sfslxhuKXvGOUlTEvPhQ45QNQMg/rKp0D1UTeiwRK22POPntmbbE+rNsg
+dUl85GfsR7EfimvJLvjf2nqLhe18vfU0nxXTszePdrwaptwSpdi9xQKsufLANDWK
+A/zXtvq1rnaduBhaKp2fSYmznflQn+n+tKUPgB7/obcFIRjvCGKvrFjq+x3gonrD
+7BEIedjSTLo50MlUksfWKqHuyLs/dEEaTHBjswIDAQABAoIBAQCSUyNzDPydXvsf
+hhoUOParPAvU4tuETYDdD9Vdi7Lgf3jDQOjulbNIq/ec3KuBvrBwIrk9APvn+YxO
+AUP9S2Vgi5jBDeDdVgNv4n90b3pSJk2UVQJI8V72wN5Ibnf/KeErSKvWo6V5daq/
+AuZtKsZIdd3WFtA62HuyuBjTGc23Alj1C0EKnN0Rx1uBwDvx/OVQ266Us/x8jJqW
+ZxIOfcvfNzBQEa5hAzbQCReVaC+rBLRAcMM2yGP7aDa+8cRkwuVlSqpX8CXBdLoU
+PqmU49etcW72Rb1AFt9WgEu1Oh9UYbHFSB+FEbO8IGcGBsuYHf9zkxQyjpy/iKyT
+H5dTu7YBAoGBAOWqEGepZVrfB+P6X18n3vbJhgYmF0sa0mCmwkFYgk36yNqsZ8at
+lQjm5mbn4wjEKHIcQ/T1taq73W471M+PxMnn0WTwoG5jsyarZGgy6/95YXiyZtQe
+qgA4P3aKkCteRP22DjG7uxmm9Hoqx8Z31vfRTLAHN1IEHPHHkg/J3gPTAoGBANO4
+aqKeY4vcDvVkvxVbADrw++tZGwA+RuxfO4HKKru59VdA2PsAxhXwb3Dfejwj7hYW
+yE9edHjGpMr1+dpf8YJYs7qjajHe1HxBOYqQGHycIdw+Gv56R4HpaS9eW3x8l/Pi
+b4xnAodv2qIriACOe7br+rll4wKX46Wt64zdvpShAoGAT0r3HQM0Vjp4u/J+qRjX
+9za+yjKuiiS5i9snaG5JlujGHhG2Rrc5pHgsBk17alRnbnZp1BJdZZQ1MFEB+aO2
+mssp1YLqsRJFEU3NfdhO+MaMq6JUtFnd8fN5ndDbU83ZXgtUPUGGqKWm9OL+VHyd
+wLQHmSL0q6F16Ngxirf0qjcCgYEAtSmiJVA+gdhk/FmeoBlkEwtNpM50Kjsf2PaM
+Jrzk4Al5A5Y7lFvPI8q+sOio4XklKsWH1VJPe2EOdZUQnGlocE6SS+u03MN9Mm1l
+XUl7inTXDGwgEQx0z5b4KE4nHlhGdauWI5+pLFbrz8RL9Z32AkneGnIyU2/AnW46
+lijQAMECgYEAmgp/88ndIw49RCtMhYhtXQ87AsEAP6kzXQyKppDkn0os+xI5igIL
+i/UDxB33hx3yjrUZwoGDV9MwlMhZNX5Tf5bwjPmmh1NR6KdEpPt5AkklX4s6uil2
+Bxl1P5l1jl/PbEYtv5LDZKIPANWRzViMSIWqjUWlbdqE7/vjx+Oo+cc=
+-----END RSA PRIVATE KEY-----
diff --git a/mysql-test/std_data/server-key-verify-pass.pem b/mysql-test/std_data/server-key-verify-pass.pem
new file mode 100644
index 00000000000..7ecc44f6d48
--- /dev/null
+++ b/mysql-test/std_data/server-key-verify-pass.pem
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEowIBAAKCAQEAwJpG1MA3vp66i/APLsJSGZO+Bxwg41AFq7JChfZXhCELAeXs
+RWfCRKNbupnUeJWkFrMYsxnUz6iBInZA8shDIePo6B4MkBDw/xt6xVVvMhBR2+Nj
+tODvegRDxVzTw0bl9zMSPpRm2A48U0v1oVbm+P90qi4wtvBSZhFFyBwNPwPnOYZW
+FytLvmjwKl8RyIwYAeAccR12SqnnJr0dy4V6FZoSZp3bFXymowdu5wynPPzkyB9k
+l2+od50Tw10X8AfwuYvtNOLRLFXiIJGLIXAoC0sg3XlYnlD9qZtxAJg0o5rSxego
+GPxAUnx/iQihVJO+WwOJPAghswXyHjnLCh8IBQIDAQABAoIBAHPQUSc9LkgBSks7
+XuXPE28t1+aOk3gcdkx4NGg5aQaal/PcPea+LaL4WAAs4AZidPjxWLjZn43+1SfT
+09opcbS/Rx3Mc+FtTn0YGQrwBJ0mExMV+K6bU2Ubi2TyHKQfzciHfUEEG5Nve/ba
+hikuCFVRxuVOQRzABcw6NqvNsmlg892lfw6/+RDwMBcz7ocwzmiOUoIxgjyFo9G4
+aJvRmHLij5892H6qveik+A/Xr+8leGQHiQET2wW/F9MFP5ypIT7aeE6remeZH7fG
+f4/Zfei/TE4xK2ElNR/91byzeKIVY4vjtTndAiBuqpfYuICb40MC02LNW5Oe6VN2
+3mQ6EgECgYEA7O4ndBnbs/00gyTGyNg6I+3wRTibhNH4R8RZFJiLfKRKOlUiLhUo
++bQeO4bCQ6YY++TYDvMEXTlA3jow9R9Mj2AWc6bNmQmJd/065QyFHftywT66I+V4
+rz1ohSJyHXcv4DxqNk3o3Vb4N8GFjZKcodSgTv2Lk+9ipDYFcQiZop0CgYEA0BrF
+SIyLTnjoVht/7RbIGEqhMQUiz5mx7qQ1TPB+YTG77G2xXJNg5d6S7WT4LN+cqbxN
+YdndIbW4NdV7bH7FlG9q7jfkuZ+AY2BPU047tcDeyO0HYYEhVY+EyZqHci/26mvt
+JrawdqS5HQS1y/rKfytm7YBGTvqoNZHvOHc6aokCgYEAxcjlbJkte+pyzMuFmiJP
+HrFBczeXM+BoJ9j0GCpjvvAS+vEYsGl/pDvFRSHwx7I/hv/5kTkzOnNSAHGJbwbq
+zYGEHJVxakC43k6pvI2gDnBa0pD/qHmmLnvP5dvkcU6Oy90DOUP+kc9JNJo7V/y8
+/qdWD7q+qwcaTETAdCSexE0CgYA/DN1Y7bwHOnqqHArWOmDFe1b7EyNI4rgWJYpA
+lVy09eyJ5XInKj/hZV3+rujCL723b2XCj89/tx7osJWEeaRDJL6xDh4uXzT25uch
+xkIw/w6Asc/aqtT+p00EB92hqwaUX76qTA+K4r1zHUo3UvSnMu8sZgDnTOpJ0L05
+zmXUgQKBgDT+IFrAzOty4B0mJncTCC/TulpW704bEZwNJfQSdtiBQr/vqoXygBQc
+bHfpncpSfhzHB5lhRUv02TqXgl53D70nM7JD5nx98WYTTBxsbvxPlt4gBRZkfgq5
+tHKclAArc1SbfW5Z8oYyl7h33LQJK116QSyiIIGieH5VXNPwnqUs
+-----END RSA PRIVATE KEY-----
diff --git a/mysql-test/suite.pm b/mysql-test/suite.pm
index bef37ac4d04..199cfba3b8f 100644
--- a/mysql-test/suite.pm
+++ b/mysql-test/suite.pm
@@ -48,7 +48,7 @@ sub skip_combinations {
return 0 unless socket my $sock, PF_INET6, SOCK_STREAM, getprotobyname('tcp');
# eval{}, if there's no Socket::sockaddr_in6 at all, old Perl installation
eval { connect $sock, sockaddr_in6(7, Socket::IN6ADDR_LOOPBACK) };
- return $! != 101;
+ return $@ eq "";
}
$skip{'include/check_ipv6.inc'} = 'No IPv6' unless ipv6_ok();
diff --git a/mysql-test/suite/federated/federatedx.result b/mysql-test/suite/federated/federatedx.result
index c93ff1493d9..7dfcfd9f359 100644
--- a/mysql-test/suite/federated/federatedx.result
+++ b/mysql-test/suite/federated/federatedx.result
@@ -2157,6 +2157,12 @@ DROP TABLE federated.t1;
End of 5.1 tests
SET @@GLOBAL.CONCURRENT_INSERT= @OLD_MASTER_CONCURRENT_INSERT;
SET @@GLOBAL.CONCURRENT_INSERT= @OLD_SLAVE_CONCURRENT_INSERT;
+#
+# MDEV-9346 - The federatedx and spider engine make mysqld crash when
+# they are configured withtout username
+#
+CREATE TABLE t1 (a INT) ENGINE=FEDERATED CONNECTION='mysql://@127.0.0.1:SLAVE_PORT/federated/t1';
+ERROR HY000: Can't create federated table. Foreign data src error: database: 'federated' username: '' hostname: '127.0.0.1'
DROP TABLE IF EXISTS federated.t1;
DROP DATABASE IF EXISTS federated;
DROP TABLE IF EXISTS federated.t1;
diff --git a/mysql-test/suite/federated/federatedx.test b/mysql-test/suite/federated/federatedx.test
index 818cc2c1681..5e405dd8d09 100644
--- a/mysql-test/suite/federated/federatedx.test
+++ b/mysql-test/suite/federated/federatedx.test
@@ -2000,4 +2000,13 @@ SET @@GLOBAL.CONCURRENT_INSERT= @OLD_SLAVE_CONCURRENT_INSERT;
connection default;
+--echo #
+--echo # MDEV-9346 - The federatedx and spider engine make mysqld crash when
+--echo # they are configured withtout username
+--echo #
+connection master;
+--replace_result $SLAVE_MYPORT SLAVE_PORT
+--error ER_CANT_CREATE_FEDERATED_TABLE
+eval CREATE TABLE t1 (a INT) ENGINE=FEDERATED CONNECTION='mysql://@127.0.0.1:$SLAVE_MYPORT/federated/t1';
+
source include/federated_cleanup.inc;
diff --git a/mysql-test/suite/innodb/r/innodb-alter-filewrite.result b/mysql-test/suite/innodb/r/innodb-alter-filewrite.result
deleted file mode 100644
index 444b09ad440..00000000000
--- a/mysql-test/suite/innodb/r/innodb-alter-filewrite.result
+++ /dev/null
@@ -1,30 +0,0 @@
-CREATE TABLE `test_wo_keys` (
-`f01` int AUTO_INCREMENT,
-`f02` bigint, `f03` bigint, `f04` enum('a','b'),
-`f05` date, `f06` int, `f07` int, `f08` double, `f09` int,
-`f10` bigint, `f11` double, `f12` enum('a','b','c','d','e'),
-`f13` int, `f14` int, `f15` varchar(255), `f16` int, `f17` int, `f18` int,
-`f19` double, `f20` double, `f21` double, `f22` double, `f23` double, `f24` tinyint,
-`f25` double, `f26` double, `f27` double, `f28` double, `f29` int unsigned,
-`f30` int unsigned, `f31` bigint, `f32` int unsigned, `f33` bigint,
-`f34` int unsigned, `f35` int unsigned,
-PRIMARY KEY `f01` (`f01`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-show status like '%merge_buffers%';
-Variable_name Value
-Innodb_os_merge_buffers_written 0
-Innodb_os_merge_buffers_read 0
-Innodb_os_merge_buffers_merged 0
-ALTER TABLE test_wo_keys
-ADD KEY `f06` (`f06`), ADD KEY `f05` (`f05`), ADD KEY `f04` (`f04`), ADD KEY `f23` (`f23`),
-ADD KEY `f10` (`f10`), ADD KEY `f11` (`f11`), ADD KEY `f09` (`f09`), ADD KEY `f22` (`f22`),
-ADD KEY `f21` (`f21`), ADD KEY `f07` (`f07`), ADD KEY `f08` (`f08`), ADD KEY `f18` (`f18`),
-ADD KEY `f19` (`f19`), ADD KEY `f20` (`f20`), ADD KEY `f29` (`f29`,`f31`,`f33`),
-ADD KEY `f35` (`f35`), ADD KEY `f25` (`f25`), ADD KEY `f26` (`f26`),
-ADD KEY `f27` (`f27`), ADD KEY `f28` (`f28`);
-show status like '%merge_buffers%';
-Variable_name Value
-Innodb_os_merge_buffers_written 0
-Innodb_os_merge_buffers_read 0
-Innodb_os_merge_buffers_merged 0
-DROP TABLE test_wo_keys;
diff --git a/mysql-test/suite/innodb/r/innodb-alter-table.result b/mysql-test/suite/innodb/r/innodb-alter-table.result
index 2c76a2640e0..514b8b7935f 100644
--- a/mysql-test/suite/innodb/r/innodb-alter-table.result
+++ b/mysql-test/suite/innodb/r/innodb-alter-table.result
@@ -43,3 +43,95 @@ KEY `mdl_courmodu_gro_ix` (`groupingid`)
# Inserting 2701 rows into the table...
ALTER TABLE moodle19.mdl_course_modules ADD stefantest LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci AFTER showdescription;
drop database moodle19;
+use test;
+CREATE TABLE `w_findispmon05u` (
+`atpkey` INT(11) NOT NULL DEFAULT '0',
+`atzo05` INT(11) NULL DEFAULT NULL,
+`pos` BIGINT(21) NULL DEFAULT NULL,
+`f5BnvB` INT(9) NULL DEFAULT NULL,
+`f5atbvb` INT(11) NULL DEFAULT NULL,
+`f5atbwmg` INT(11) NULL DEFAULT NULL,
+`f5pBneu` BIGINT(12) NULL DEFAULT NULL,
+`atbwdt` INT(11) NULL DEFAULT NULL,
+`atbwzt` INT(11) NULL DEFAULT NULL,
+`atbart` VARCHAR(10) NULL DEFAULT NULL
+)
+COLLATE='utf8_general_ci'
+ENGINE=InnoDB;
+ALTER TABLE `w_findispmon05u`
+CHANGE COLUMN `atpkey` `f5atpkey` INT(11) NOT NULL DEFAULT '0' FIRST,
+CHANGE COLUMN `atzo05` `f5atzo05` INT(11) NULL DEFAULT NULL AFTER `f5atpkey`,
+CHANGE COLUMN `atbwdt` `f5atbwdt` INT(11) NULL DEFAULT NULL AFTER `f5pBneu`,
+CHANGE COLUMN `atbwzt` `f5atbwzt` INT(11) NULL DEFAULT NULL AFTER `f5atbwdt`,
+CHANGE COLUMN `atbart` `f5atbart` VARCHAR(10) NULL DEFAULT NULL AFTER `f5atbwzt`,
+ADD INDEX `atpkey` (`f5atpkey`),
+ADD INDEX `inatkey` (`f5atzo05`, `pos`),
+ADD INDEX `pos` (`pos`, `f5atzo05`);
+SHOW WARNINGS;
+Level Code Message
+SHOW CREATE TABLE `w_findispmon05u`;
+Table Create Table
+w_findispmon05u CREATE TABLE `w_findispmon05u` (
+ `f5atpkey` int(11) NOT NULL DEFAULT '0',
+ `f5atzo05` int(11) DEFAULT NULL,
+ `pos` bigint(21) DEFAULT NULL,
+ `f5BnvB` int(9) DEFAULT NULL,
+ `f5atbvb` int(11) DEFAULT NULL,
+ `f5atbwmg` int(11) DEFAULT NULL,
+ `f5pBneu` bigint(12) DEFAULT NULL,
+ `f5atbwdt` int(11) DEFAULT NULL,
+ `f5atbwzt` int(11) DEFAULT NULL,
+ `f5atbart` varchar(10) DEFAULT NULL,
+ KEY `atpkey` (`f5atpkey`),
+ KEY `inatkey` (`f5atzo05`,`pos`),
+ KEY `pos` (`pos`,`f5atzo05`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8
+DROP TABLE `w_findispmon05u`;
+CREATE TABLE t (
+a INT NOT NULL,
+b INT NOT NULL,
+PRIMARY KEY (a)
+) ENGINE=INNODB;
+ALTER TABLE t
+CHANGE COLUMN b c INT NOT NULL,
+ADD UNIQUE INDEX (c);
+SHOW WARNINGS;
+Level Code Message
+SHOW CREATE TABLE t;
+Table Create Table
+t CREATE TABLE `t` (
+ `a` int(11) NOT NULL,
+ `c` int(11) NOT NULL,
+ PRIMARY KEY (`a`),
+ UNIQUE KEY `c` (`c`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ALTER TABLE t
+CHANGE COLUMN c b INT NOT NULL,
+ADD UNIQUE INDEX (c);
+ERROR 42000: Key column 'c' doesn't exist in table
+DROP TABLE t;
+CREATE TABLE parent (
+a INT NOT NULL,
+b INT NOT NULL,
+PRIMARY KEY (a)
+) ENGINE=INNODB;
+CREATE TABLE child (
+a INT NOT NULL,
+b INT NOT NULL,
+PRIMARY KEY (a)
+) ENGINE=INNODB;
+ALTER TABLE child
+CHANGE COLUMN b c INT NOT NULL,
+ADD FOREIGN KEY (c) REFERENCES parent(a);
+SHOW WARNINGS;
+Level Code Message
+SHOW CREATE TABLE child;
+Table Create Table
+child CREATE TABLE `child` (
+ `a` int(11) NOT NULL,
+ `c` int(11) NOT NULL,
+ PRIMARY KEY (`a`),
+ KEY `c` (`c`),
+ CONSTRAINT `child_ibfk_1` FOREIGN KEY (`c`) REFERENCES `parent` (`a`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+DROP TABLE child, parent;
diff --git a/mysql-test/suite/innodb/r/innodb_monitor.result b/mysql-test/suite/innodb/r/innodb_monitor.result
index 89ce676e38b..f8d24f4e6f5 100644
--- a/mysql-test/suite/innodb/r/innodb_monitor.result
+++ b/mysql-test/suite/innodb/r/innodb_monitor.result
@@ -123,9 +123,6 @@ os_log_bytes_written disabled
os_log_fsyncs disabled
os_log_pending_fsyncs disabled
os_log_pending_writes disabled
-os_merge_blocks_written disabled
-os_merge_blocks_read disabled
-os_merge_blocks_merged disabled
trx_rw_commits disabled
trx_ro_commits disabled
trx_nl_ro_commits disabled
@@ -257,9 +254,6 @@ lock_row_lock_time disabled
lock_row_lock_time_max disabled
lock_row_lock_waits disabled
lock_row_lock_time_avg disabled
-os_merge_blocks_written disabled
-os_merge_blocks_read disabled
-os_merge_blocks_merged disabled
innodb_rwlock_s_spin_waits disabled
innodb_rwlock_x_spin_waits disabled
innodb_rwlock_s_spin_rounds disabled
@@ -298,9 +292,6 @@ os_log_bytes_written disabled
os_log_fsyncs disabled
os_log_pending_fsyncs enabled
os_log_pending_writes enabled
-os_merge_blocks_written disabled
-os_merge_blocks_read disabled
-os_merge_blocks_merged disabled
set global innodb_monitor_enable="";
ERROR 42000: Variable 'innodb_monitor_enable' can't be set to the value of ''
set global innodb_monitor_enable="_";
diff --git a/mysql-test/suite/innodb/r/tmpdir.result b/mysql-test/suite/innodb/r/tmpdir.result
new file mode 100644
index 00000000000..f9475c1b7f8
--- /dev/null
+++ b/mysql-test/suite/innodb/r/tmpdir.result
@@ -0,0 +1,51 @@
+#
+# Bug #19183565 CREATE DYNAMIC INNODB_TMPDIR VARIABLE TO CONTROL
+# WHERE INNODB WRITES TEMP FILES
+#
+# If innodb_tmpdir is NULL or "", temporary file will be created in
+# server configuration variable location(--tmpdir)
+create table t1(a int primary key)engine=innodb;
+show session variables like 'innodb_tmpdir';
+Variable_name Value
+innodb_tmpdir
+alter table t1 add column b int not null;
+set global innodb_tmpdir=NULL;
+# Connection con1
+show session variables like 'innodb_tmpdir';
+Variable_name Value
+innodb_tmpdir
+alter table t1 add key(b);
+drop table t1;
+# innodb_tmpdir with invalid path.
+create table t1(a int primary key)engine=innodb;
+set global innodb_tmpdir='wrong_value';
+ERROR 42000: Variable 'innodb_tmpdir' can't be set to the value of 'wrong_value'
+show warnings;
+Level Code Message
+Warning 1210 InnoDB: Path doesn't exist.
+Error 1231 Variable 'innodb_tmpdir' can't be set to the value of 'wrong_value'
+drop table t1;
+# innodb_tmpdir with mysql data directory path.
+create table t1(a text, b text, fulltext(a,b))engine=innodb;
+insert into t1 values('test1', 'test2');
+insert into t1 values('text1', 'text2');
+set global innodb_tmpdir = @@global.datadir;
+ERROR 42000: Variable 'innodb_tmpdir' can't be set to the value of 'MYSQL_DATADIR'
+show warnings;
+Level Code Message
+Warning 1210 InnoDB: Path Location should not be same as mysql data directory location.
+Error 1231 DATADIR/data/'
+drop table t1;
+# innodb_tmpdir with valid location.
+create table t1(a text, b text, fulltext(a,b))engine=innodb;
+insert into t1 values('test1', 'test2');
+insert into t1 values('text1', 'text2');
+set @tmpdir = @@global.tmpdir;
+set global innodb_tmpdir = @tmpdir;
+show session variables like 'innodb_tmpdir';
+Variable_name Value
+innodb_tmpdir
+# Connection con3
+alter table t1 add fulltext(b);
+set global innodb_tmpdir=NULL;
+drop table t1;
diff --git a/mysql-test/suite/innodb/t/innodb-alter-filewrite.test b/mysql-test/suite/innodb/t/innodb-alter-filewrite.test
deleted file mode 100644
index d0372056937..00000000000
--- a/mysql-test/suite/innodb/t/innodb-alter-filewrite.test
+++ /dev/null
@@ -1,32 +0,0 @@
---source include/have_innodb.inc
-
-#
-# MDEV-8696: Adding indexes on empty table is slow with large innodb_sort_buffer_size.
-#
-
-CREATE TABLE `test_wo_keys` (
-`f01` int AUTO_INCREMENT,
-`f02` bigint, `f03` bigint, `f04` enum('a','b'),
-`f05` date, `f06` int, `f07` int, `f08` double, `f09` int,
-`f10` bigint, `f11` double, `f12` enum('a','b','c','d','e'),
-`f13` int, `f14` int, `f15` varchar(255), `f16` int, `f17` int, `f18` int,
-`f19` double, `f20` double, `f21` double, `f22` double, `f23` double, `f24` tinyint,
-`f25` double, `f26` double, `f27` double, `f28` double, `f29` int unsigned,
-`f30` int unsigned, `f31` bigint, `f32` int unsigned, `f33` bigint,
-`f34` int unsigned, `f35` int unsigned,
-PRIMARY KEY `f01` (`f01`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-
-show status like '%merge_buffers%';
-
-ALTER TABLE test_wo_keys
-ADD KEY `f06` (`f06`), ADD KEY `f05` (`f05`), ADD KEY `f04` (`f04`), ADD KEY `f23` (`f23`),
-ADD KEY `f10` (`f10`), ADD KEY `f11` (`f11`), ADD KEY `f09` (`f09`), ADD KEY `f22` (`f22`),
-ADD KEY `f21` (`f21`), ADD KEY `f07` (`f07`), ADD KEY `f08` (`f08`), ADD KEY `f18` (`f18`),
-ADD KEY `f19` (`f19`), ADD KEY `f20` (`f20`), ADD KEY `f29` (`f29`,`f31`,`f33`),
-ADD KEY `f35` (`f35`), ADD KEY `f25` (`f25`), ADD KEY `f26` (`f26`),
-ADD KEY `f27` (`f27`), ADD KEY `f28` (`f28`);
-
-show status like '%merge_buffers%';
-
-DROP TABLE test_wo_keys;
diff --git a/mysql-test/suite/innodb/t/innodb-alter-table.test b/mysql-test/suite/innodb/t/innodb-alter-table.test
index 2be2a30194d..2ad9c8791cb 100644
--- a/mysql-test/suite/innodb/t/innodb-alter-table.test
+++ b/mysql-test/suite/innodb/t/innodb-alter-table.test
@@ -57,3 +57,84 @@ while ($num)
ALTER TABLE moodle19.mdl_course_modules ADD stefantest LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci AFTER showdescription;
drop database moodle19;
+
+#
+# Mdev-9469: Incorrect key file on alter table
+#
+use test;
+
+CREATE TABLE `w_findispmon05u` (
+`atpkey` INT(11) NOT NULL DEFAULT '0',
+`atzo05` INT(11) NULL DEFAULT NULL,
+`pos` BIGINT(21) NULL DEFAULT NULL,
+`f5BnvB` INT(9) NULL DEFAULT NULL,
+`f5atbvb` INT(11) NULL DEFAULT NULL,
+`f5atbwmg` INT(11) NULL DEFAULT NULL,
+`f5pBneu` BIGINT(12) NULL DEFAULT NULL,
+`atbwdt` INT(11) NULL DEFAULT NULL,
+`atbwzt` INT(11) NULL DEFAULT NULL,
+`atbart` VARCHAR(10) NULL DEFAULT NULL
+)
+COLLATE='utf8_general_ci'
+ENGINE=InnoDB;
+ALTER TABLE `w_findispmon05u`
+CHANGE COLUMN `atpkey` `f5atpkey` INT(11) NOT NULL DEFAULT '0' FIRST,
+CHANGE COLUMN `atzo05` `f5atzo05` INT(11) NULL DEFAULT NULL AFTER `f5atpkey`,
+CHANGE COLUMN `atbwdt` `f5atbwdt` INT(11) NULL DEFAULT NULL AFTER `f5pBneu`,
+CHANGE COLUMN `atbwzt` `f5atbwzt` INT(11) NULL DEFAULT NULL AFTER `f5atbwdt`,
+CHANGE COLUMN `atbart` `f5atbart` VARCHAR(10) NULL DEFAULT NULL AFTER `f5atbwzt`,
+ADD INDEX `atpkey` (`f5atpkey`),
+ADD INDEX `inatkey` (`f5atzo05`, `pos`),
+ADD INDEX `pos` (`pos`, `f5atzo05`);
+
+SHOW WARNINGS;
+SHOW CREATE TABLE `w_findispmon05u`;
+
+DROP TABLE `w_findispmon05u`;
+
+CREATE TABLE t (
+ a INT NOT NULL,
+ b INT NOT NULL,
+ PRIMARY KEY (a)
+) ENGINE=INNODB;
+
+ALTER TABLE t
+ CHANGE COLUMN b c INT NOT NULL,
+ ADD UNIQUE INDEX (c);
+
+SHOW WARNINGS;
+SHOW CREATE TABLE t;
+
+# this should fail
+--error 1072
+ALTER TABLE t
+ CHANGE COLUMN c b INT NOT NULL,
+ ADD UNIQUE INDEX (c);
+
+DROP TABLE t;
+
+#
+# Check Foreign Keys
+#
+CREATE TABLE parent (
+ a INT NOT NULL,
+ b INT NOT NULL,
+ PRIMARY KEY (a)
+) ENGINE=INNODB;
+
+CREATE TABLE child (
+ a INT NOT NULL,
+ b INT NOT NULL,
+ PRIMARY KEY (a)
+) ENGINE=INNODB;
+
+ALTER TABLE child
+ CHANGE COLUMN b c INT NOT NULL,
+ ADD FOREIGN KEY (c) REFERENCES parent(a);
+
+SHOW WARNINGS;
+
+SHOW CREATE TABLE child;
+
+DROP TABLE child, parent;
+
diff --git a/mysql-test/suite/innodb/t/tmpdir.test b/mysql-test/suite/innodb/t/tmpdir.test
new file mode 100644
index 00000000000..abe455adda5
--- /dev/null
+++ b/mysql-test/suite/innodb/t/tmpdir.test
@@ -0,0 +1,68 @@
+--source include/have_innodb.inc
+--source include/count_sessions.inc
+
+if (`select plugin_auth_version <= "5.6.28-MariaDB-76.1" from information_schema.plugins where plugin_name='innodb'`)
+{
+ --skip Not fixed in XtraDB as of 5.6.28-MariaDB-76.1 or earlier
+}
+
+--echo #
+--echo # Bug #19183565 CREATE DYNAMIC INNODB_TMPDIR VARIABLE TO CONTROL
+--echo # WHERE INNODB WRITES TEMP FILES
+--echo #
+
+--echo # If innodb_tmpdir is NULL or "", temporary file will be created in
+--echo # server configuration variable location(--tmpdir)
+
+create table t1(a int primary key)engine=innodb;
+show session variables like 'innodb_tmpdir';
+alter table t1 add column b int not null;
+set global innodb_tmpdir=NULL;
+--echo # Connection con1
+connect (con1,localhost,root);
+show session variables like 'innodb_tmpdir';
+alter table t1 add key(b);
+connection default;
+disconnect con1;
+drop table t1;
+
+--echo # innodb_tmpdir with invalid path.
+
+create table t1(a int primary key)engine=innodb;
+--error ER_WRONG_VALUE_FOR_VAR
+set global innodb_tmpdir='wrong_value';
+show warnings;
+drop table t1;
+
+
+--echo # innodb_tmpdir with mysql data directory path.
+
+let $MYSQLD_DATADIR= `select @@datadir`;
+create table t1(a text, b text, fulltext(a,b))engine=innodb;
+insert into t1 values('test1', 'test2');
+insert into t1 values('text1', 'text2');
+--replace_result $MYSQLD_DATADIR MYSQL_DATADIR
+--error ER_WRONG_VALUE_FOR_VAR
+set global innodb_tmpdir = @@global.datadir;
+--replace_regex /.*mysqld.1/DATADIR/
+show warnings;
+drop table t1;
+
+--echo # innodb_tmpdir with valid location.
+let $MYSQL_TMP_DIR= `select @@tmpdir`;
+create table t1(a text, b text, fulltext(a,b))engine=innodb;
+insert into t1 values('test1', 'test2');
+insert into t1 values('text1', 'text2');
+set @tmpdir = @@global.tmpdir;
+set global innodb_tmpdir = @tmpdir;
+show session variables like 'innodb_tmpdir';
+--echo # Connection con3
+connect (con3,localhost,root);
+# Following alter using innodb_tmpdir as a path to create temporary files
+alter table t1 add fulltext(b);
+disconnect con3;
+connection default;
+set global innodb_tmpdir=NULL;
+drop table t1;
+
+--source include/wait_until_count_sessions.inc
diff --git a/mysql-test/suite/parts/t/partition_debug_innodb-master.opt b/mysql-test/suite/parts/t/partition_debug_innodb-master.opt
index 6daff4c7c6b..5253df4563a 100644
--- a/mysql-test/suite/parts/t/partition_debug_innodb-master.opt
+++ b/mysql-test/suite/parts/t/partition_debug_innodb-master.opt
@@ -1 +1 @@
---loose-innodb-file-format-check --loose-innodb-file-per-table=1 --skip-stack-trace --skip-core-file
+--loose-innodb-file-format-check --loose-innodb-file-per-table=1 --skip-stack-trace --skip-core-file --loose-innodb-buffer-pool-size=32M
diff --git a/mysql-test/suite/perfschema/r/view_table_io.result b/mysql-test/suite/perfschema/r/view_table_io.result
index 5f17b5ae9e1..db6acf65c73 100644
--- a/mysql-test/suite/perfschema/r/view_table_io.result
+++ b/mysql-test/suite/perfschema/r/view_table_io.result
@@ -52,7 +52,7 @@ insert into marker set a = 1;
optimize table test.v1;
Table Op Msg_type Msg_text
test.v1 optimize Error 'test.v1' is not BASE TABLE
-test.v1 optimize error Corrupt
+test.v1 optimize status Operation failed
insert into marker set a = 1;
select * from test.v1;
a b
diff --git a/mysql-test/suite/perfschema/t/dml_setup_instruments.test b/mysql-test/suite/perfschema/t/dml_setup_instruments.test
index 8a4f11ba51f..6b4fe89a1cf 100644
--- a/mysql-test/suite/perfschema/t/dml_setup_instruments.test
+++ b/mysql-test/suite/perfschema/t/dml_setup_instruments.test
@@ -88,3 +88,10 @@ UNLOCK TABLES;
--echo
UPDATE performance_schema.setup_instruments SET timed='NO'
ORDER BY RAND();
+
+# MTR is configured to start with everything set to ON,
+# so we need to restore it after the previous update
+--disable_query_log
+update performance_schema.setup_instruments set timed='YES';
+--enable_query_log
+
diff --git a/mysql-test/suite/plugins/r/auth_v0100.result b/mysql-test/suite/plugins/r/auth_v0100.result
index 53affc94947..a72b8e209b0 100644
--- a/mysql-test/suite/plugins/r/auth_v0100.result
+++ b/mysql-test/suite/plugins/r/auth_v0100.result
@@ -1,9 +1,8 @@
install soname 'auth_0x0100';
-select plugin_name, plugin_type_version from information_schema.plugins where plugin_type='authentication' order by plugin_name;
+select plugin_name, plugin_type_version from information_schema.plugins where
+plugin_type='authentication' and plugin_library is not null order by plugin_name;
plugin_name plugin_type_version
auth_0x0100 1.0
-mysql_native_password 2.0
-mysql_old_password 2.0
create user tt identified via auth_0x0100;
grant select on test.* to zzzzzzzzzzzzzzzz;
connect(localhost,tt,,test,MASTER_MYPORT,MASTER_MYSOCK);
diff --git a/mysql-test/suite/plugins/r/feedback_plugin_install.result b/mysql-test/suite/plugins/r/feedback_plugin_install.result
index c52fdb8f85b..ee74435e05a 100644
--- a/mysql-test/suite/plugins/r/feedback_plugin_install.result
+++ b/mysql-test/suite/plugins/r/feedback_plugin_install.result
@@ -8,6 +8,7 @@ select * from information_schema.feedback where variable_name like 'feed%'
VARIABLE_NAME VARIABLE_VALUE
FEEDBACK used 1
FEEDBACK version 1.1
+FEEDBACK_HTTP_PROXY
FEEDBACK_SEND_RETRY_WAIT 60
FEEDBACK_SEND_TIMEOUT 60
FEEDBACK_URL http://mariadb.org/feedback_plugin/post
diff --git a/mysql-test/suite/plugins/r/feedback_plugin_load.result b/mysql-test/suite/plugins/r/feedback_plugin_load.result
index 58507036af2..8770ce19f49 100644
--- a/mysql-test/suite/plugins/r/feedback_plugin_load.result
+++ b/mysql-test/suite/plugins/r/feedback_plugin_load.result
@@ -10,6 +10,7 @@ select * from information_schema.feedback where variable_name like 'feed%'
and variable_name not like '%debug%';
VARIABLE_NAME VARIABLE_VALUE
FEEDBACK version 1.1
+FEEDBACK_HTTP_PROXY
FEEDBACK_SEND_RETRY_WAIT 60
FEEDBACK_SEND_TIMEOUT 60
FEEDBACK_URL http://mariadb.org/feedback_plugin/post
diff --git a/mysql-test/suite/plugins/r/feedback_plugin_send.result b/mysql-test/suite/plugins/r/feedback_plugin_send.result
index 8f3f33076da..935ea11d67b 100644
--- a/mysql-test/suite/plugins/r/feedback_plugin_send.result
+++ b/mysql-test/suite/plugins/r/feedback_plugin_send.result
@@ -10,6 +10,7 @@ select * from information_schema.feedback where variable_name like 'feed%'
and variable_name not like '%debug%';
VARIABLE_NAME VARIABLE_VALUE
FEEDBACK version 1.1
+FEEDBACK_HTTP_PROXY
FEEDBACK_SEND_RETRY_WAIT 60
FEEDBACK_SEND_TIMEOUT 60
FEEDBACK_URL http://mariadb.org/feedback_plugin/post
diff --git a/mysql-test/suite/plugins/r/server_audit.result b/mysql-test/suite/plugins/r/server_audit.result
index bf71e518f97..2577a36cad4 100644
--- a/mysql-test/suite/plugins/r/server_audit.result
+++ b/mysql-test/suite/plugins/r/server_audit.result
@@ -8,6 +8,7 @@ server_audit_file_rotate_now OFF
server_audit_file_rotate_size 1000000
server_audit_file_rotations 9
server_audit_incl_users
+server_audit_loc_info
server_audit_logging OFF
server_audit_mode 0
server_audit_output_type file
@@ -71,6 +72,7 @@ server_audit_file_rotate_now OFF
server_audit_file_rotate_size 1000000
server_audit_file_rotations 9
server_audit_incl_users odin, root, dva, tri
+server_audit_loc_info
server_audit_logging ON
server_audit_mode 0
server_audit_output_type file
@@ -216,6 +218,7 @@ server_audit_file_rotate_now OFF
server_audit_file_rotate_size 1000000
server_audit_file_rotations 9
server_audit_incl_users odin, root, dva, tri
+server_audit_loc_info
server_audit_logging ON
server_audit_mode 1
server_audit_output_type file
@@ -289,7 +292,7 @@ TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,proc,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proc,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,event,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop database sa_db',0
-TIME,HOSTNAME,root,localhost,ID,0,DISCONNECT,sa_db,,0
+TIME,HOSTNAME,root,localhost,ID,0,DISCONNECT,,,0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'create database sa_db',0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'use sa_db',0
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user,
diff --git a/mysql-test/suite/plugins/r/sql_error_log.result b/mysql-test/suite/plugins/r/sql_error_log.result
index 3086b1f2d1f..a583cf91a83 100644
--- a/mysql-test/suite/plugins/r/sql_error_log.result
+++ b/mysql-test/suite/plugins/r/sql_error_log.result
@@ -35,6 +35,15 @@ SET SQL_MODE = '';
drop table t1;
SELECT TABLE_NAME FROM information_schema.TABLES WHERE TABLE_SCHEMA = 'not_exists' AND TABLE_NAME = 'not_exists';
TABLE_NAME
+CREATE procedure e1()
+BEGIN
+START TRANSACTION;
+INSERT INTO test.non_exists VALUES (0,0,0) /* e1 */;
+COMMIT;
+END|
+CALL e1();
+ERROR 42S02: Table 'test.non_exists' doesn't exist
+DROP PROCEDURE e1;
uninstall plugin SQL_ERROR_LOG;
Warnings:
Warning 1620 Plugin is busy and will be uninstalled on shutdown
@@ -45,3 +54,4 @@ TIME HOSTNAME ERROR 1000: new message : RESIGNAL SQLSTATE '40000' SET
MYSQL_ERRNO = 1000,
MESSAGE_TEXT = 'new message'
TIME HOSTNAME ERROR 1366: Incorrect integer value: 'aa' for column 'id' at row 1 : insert into t1 values ('aa')
+TIME HOSTNAME ERROR 1146: Table 'test.non_exists' doesn't exist : INSERT INTO test.non_exists VALUES (0,0,0) /* e1 */
diff --git a/mysql-test/suite/plugins/r/thread_pool_server_audit.result b/mysql-test/suite/plugins/r/thread_pool_server_audit.result
index bf71e518f97..2577a36cad4 100644
--- a/mysql-test/suite/plugins/r/thread_pool_server_audit.result
+++ b/mysql-test/suite/plugins/r/thread_pool_server_audit.result
@@ -8,6 +8,7 @@ server_audit_file_rotate_now OFF
server_audit_file_rotate_size 1000000
server_audit_file_rotations 9
server_audit_incl_users
+server_audit_loc_info
server_audit_logging OFF
server_audit_mode 0
server_audit_output_type file
@@ -71,6 +72,7 @@ server_audit_file_rotate_now OFF
server_audit_file_rotate_size 1000000
server_audit_file_rotations 9
server_audit_incl_users odin, root, dva, tri
+server_audit_loc_info
server_audit_logging ON
server_audit_mode 0
server_audit_output_type file
@@ -216,6 +218,7 @@ server_audit_file_rotate_now OFF
server_audit_file_rotate_size 1000000
server_audit_file_rotations 9
server_audit_incl_users odin, root, dva, tri
+server_audit_loc_info
server_audit_logging ON
server_audit_mode 1
server_audit_output_type file
@@ -289,7 +292,7 @@ TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,proc,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proc,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,event,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop database sa_db',0
-TIME,HOSTNAME,root,localhost,ID,0,DISCONNECT,sa_db,,0
+TIME,HOSTNAME,root,localhost,ID,0,DISCONNECT,,,0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'create database sa_db',0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'use sa_db',0
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user,
diff --git a/mysql-test/suite/plugins/t/auth_v0100.test b/mysql-test/suite/plugins/t/auth_v0100.test
index 3cf93ba67f2..c4333d376d3 100644
--- a/mysql-test/suite/plugins/t/auth_v0100.test
+++ b/mysql-test/suite/plugins/t/auth_v0100.test
@@ -6,7 +6,8 @@ if (!$AUTH_0X0100_SO) {
install soname 'auth_0x0100';
-select plugin_name, plugin_type_version from information_schema.plugins where plugin_type='authentication' order by plugin_name;
+select plugin_name, plugin_type_version from information_schema.plugins where
+plugin_type='authentication' and plugin_library is not null order by plugin_name;
create user tt identified via auth_0x0100;
grant select on test.* to zzzzzzzzzzzzzzzz;
diff --git a/mysql-test/suite/plugins/t/sql_error_log.test b/mysql-test/suite/plugins/t/sql_error_log.test
index a28e2d2e259..6c83e9655ce 100644
--- a/mysql-test/suite/plugins/t/sql_error_log.test
+++ b/mysql-test/suite/plugins/t/sql_error_log.test
@@ -48,6 +48,24 @@ drop table t1;
SELECT TABLE_NAME FROM information_schema.TABLES WHERE TABLE_SCHEMA = 'not_exists' AND TABLE_NAME = 'not_exists';
+#
+# MDEV-6421 SQL_ERROR_LOG doesn't log comments in Events
+# actually testing SP call is enough for that.
+
+DELIMITER |;
+
+CREATE procedure e1()
+BEGIN
+ START TRANSACTION;
+ INSERT INTO test.non_exists VALUES (0,0,0) /* e1 */;
+ COMMIT;
+END|
+
+DELIMITER ;|
+--error ER_NO_SUCH_TABLE
+CALL e1();
+DROP PROCEDURE e1;
+
uninstall plugin SQL_ERROR_LOG;
let $MYSQLD_DATADIR= `SELECT @@datadir`;
diff --git a/mysql-test/suite/rpl/r/rpl_autogen_query_multi_byte_char.result b/mysql-test/suite/rpl/r/rpl_autogen_query_multi_byte_char.result
new file mode 100644
index 00000000000..b03c0057a69
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_autogen_query_multi_byte_char.result
@@ -0,0 +1,29 @@
+include/master-slave.inc
+[connection master]
+Test case 1:- table name with one character latin name.
+SET @s:=CONCAT("CREATE TABLE `",REPEAT(CHAR(131),1),"` (a INT)");
+PREPARE STMT FROM @s;
+EXECUTE stmt;
+SET @s:=CONCAT("INSERT INTO `",REPEAT(CHAR(131),1),"` VALUES (1)");
+PREPARE STMT FROM @s;
+EXECUTE stmt;
+SET @s:=CONCAT("DROP TABLE `",REPEAT(CHAR(131),1), "`");
+PREPARE STMT FROM @s;
+EXECUTE stmt;
+Test case 2:- table name and database names with one character latin name.
+SET @s:=CONCAT("CREATE DATABASE `",REPEAT(CHAR(131),1),"`");
+PREPARE STMT FROM @s;
+EXECUTE stmt;
+SET @s:=CONCAT("CREATE TABLE `",REPEAT(CHAR(131),1),"`.`",REPEAT(CHAR(131),1),"` (a INT)");
+PREPARE STMT FROM @s;
+EXECUTE stmt;
+SET @s:=CONCAT("INSERT INTO `",REPEAT(CHAR(131),1),"`.`",REPEAT(CHAR(131),1),"` VALUES (1)");
+PREPARE STMT FROM @s;
+EXECUTE stmt;
+SET @s:=CONCAT("DROP TABLE `",REPEAT(CHAR(131),1),"`.`",REPEAT(CHAR(131),1), "`");
+PREPARE STMT FROM @s;
+EXECUTE stmt;
+SET @s:=CONCAT("DROP DATABASE `",REPEAT(CHAR(131),1),"`");
+PREPARE STMT FROM @s;
+EXECUTE stmt;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_parallel.result b/mysql-test/suite/rpl/r/rpl_parallel.result
index 81243bbba49..ca3a2c50ee0 100644
--- a/mysql-test/suite/rpl/r/rpl_parallel.result
+++ b/mysql-test/suite/rpl/r/rpl_parallel.result
@@ -929,6 +929,8 @@ a
31
32
SET sql_slave_skip_counter= 1;
+ERROR HY000: When using parallel replication and GTID with multiple replication domains, @@sql_slave_skip_counter can not be used. Instead, setting @@gtid_slave_pos explicitly can be used to skip to after a given GTID position.
+include/stop_slave_io.inc
include/start_slave.inc
include/sync_with_master_gtid.inc
SELECT * FROM t2 WHERE a >= 30 ORDER BY a;
diff --git a/mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result b/mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result
index 6aca4282ccd..27b23739831 100644
--- a/mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result
+++ b/mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result
@@ -22,7 +22,8 @@ include/wait_for_slave_to_stop.inc
drop table t1;
flush tables with read lock;
start slave;
-include/wait_for_slave_to_start.inc
+include/wait_for_slave_param.inc [Slave_IO_Running]
+include/wait_for_slave_sql_to_start.inc
stop slave;
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
unlock tables;
diff --git a/mysql-test/suite/rpl/r/rpl_semi_sync_uninstall_plugin.result b/mysql-test/suite/rpl/r/rpl_semi_sync_uninstall_plugin.result
index 0809af5f943..36d862dedce 100644
--- a/mysql-test/suite/rpl/r/rpl_semi_sync_uninstall_plugin.result
+++ b/mysql-test/suite/rpl/r/rpl_semi_sync_uninstall_plugin.result
@@ -14,6 +14,10 @@ DROP TABLE t1;
[connection slave]
include/install_semisync.inc
[connection slave]
+show global status like "Slave%_running";
+Variable_name Value
+Slave_running ON
+Slaves_running 1
UNINSTALL PLUGIN rpl_semi_sync_slave;
Warnings:
Warning 1620 Plugin is busy and will be uninstalled on shutdown
@@ -21,6 +25,10 @@ select plugin_name,plugin_status from information_schema.plugins where plugin_na
plugin_name plugin_status
rpl_semi_sync_slave DELETED
[connection master]
+show global status like "Slave%_connect%";
+Variable_name Value
+Slave_connections 2
+Slaves_connected 1
UNINSTALL PLUGIN rpl_semi_sync_master;
Warnings:
Warning 1620 Plugin is busy and will be uninstalled on shutdown
diff --git a/mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result b/mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result
index 6aca4282ccd..27b23739831 100644
--- a/mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result
+++ b/mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result
@@ -22,7 +22,8 @@ include/wait_for_slave_to_stop.inc
drop table t1;
flush tables with read lock;
start slave;
-include/wait_for_slave_to_start.inc
+include/wait_for_slave_param.inc [Slave_IO_Running]
+include/wait_for_slave_sql_to_start.inc
stop slave;
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
unlock tables;
diff --git a/mysql-test/suite/rpl/r/rpl_unsafe_statements.result b/mysql-test/suite/rpl/r/rpl_unsafe_statements.result
new file mode 100644
index 00000000000..2efb3eba2b1
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_unsafe_statements.result
@@ -0,0 +1,53 @@
+include/master-slave.inc
+[connection master]
+CREATE TABLE t1(id INT AUTO_INCREMENT, i INT, PRIMARY KEY (id)) ENGINE=INNODB;
+CREATE TABLE t2(id INT AUTO_INCREMENT, i INT, PRIMARY KEY (id)) ENGINE=INNODB;
+CREATE TRIGGER trig1 AFTER INSERT ON t1
+FOR EACH ROW
+INSERT INTO t2(i) VALUES(new.i);
+START TRANSACTION;
+INSERT INTO t2(i) VALUES (1);
+ROLLBACK;
+INSERT INTO t1(i) VALUES(2);
+START TRANSACTION;
+LOCK TABLES t1 WRITE, t2 WRITE;
+INSERT INTO t1(i) VALUES(3);
+UNLOCK TABLES;
+COMMIT;
+include/diff_tables.inc [master:t1, slave:t1]
+include/diff_tables.inc [master:t2, slave:t2]
+DROP TABLE t1,t2;
+CREATE TABLE t1(i INT) ENGINE=INNODB;
+CREATE TABLE t2(id INT AUTO_INCREMENT, i INT, PRIMARY KEY (id)) ENGINE=INNODB;
+INSERT INTO t1 values (1), (2), (3);
+START TRANSACTION;
+INSERT INTO t2(i) VALUES (1);
+ROLLBACK;
+INSERT INTO t2(i) SELECT i FROM t1;
+START TRANSACTION;
+LOCK TABLES t2 WRITE, t1 READ;
+INSERT INTO t2(i) SELECT i FROM t1;
+UNLOCK TABLES;
+COMMIT;
+include/diff_tables.inc [master:t1, slave:t1]
+include/diff_tables.inc [master:t2, slave:t2]
+DROP TABLE t1,t2;
+CREATE TABLE t1(i int, id INT AUTO_INCREMENT, PRIMARY KEY (i, id)) ENGINE=MYISAM;
+INSERT INTO t1 (i) values (1);
+START TRANSACTION;
+LOCK TABLES t1 WRITE;
+INSERT INTO t1 (i) values (2);
+UNLOCK TABLES;
+COMMIT;
+include/diff_tables.inc [master:t1, slave:t1]
+DROP TABLE t1;
+CREATE TABLE t1(i INT, j INT, UNIQUE KEY(i), UNIQUE KEY(j)) ENGINE=INNODB;
+INSERT INTO t1 (i,j) VALUES (1,2) ON DUPLICATE KEY UPDATE j=j+1;
+START TRANSACTION;
+LOCK TABLES t1 WRITE;
+INSERT INTO t1 (i,j) VALUES (1,2) ON DUPLICATE KEY UPDATE j=j+1;
+UNLOCK TABLES;
+COMMIT;
+include/diff_tables.inc [master:t1, slave:t1]
+DROP TABLE t1;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_autogen_query_multi_byte_char.test b/mysql-test/suite/rpl/t/rpl_autogen_query_multi_byte_char.test
new file mode 100644
index 00000000000..a93fcbac82f
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_autogen_query_multi_byte_char.test
@@ -0,0 +1,87 @@
+###############################################################################
+# Bug#21205695 DROP TABLE MAY CAUSE SLAVES TO BREAK
+#
+# Problem:
+# ========
+# 1) Drop table queries are re-generated by server
+# before writing the events(queries) into binlog
+# for various reasons. If table name/db name contains
+# a non regular characters (like latin characters),
+# the generated query is wrong. Hence it breaks the
+# replication.
+# 2) In the edge case, when table name contains
+# 64 latin characters (latin takes 2 bytes), server is
+# throwing an assert (M_TBLLEN < 128)
+#
+# 3) In the edge case, when db name contains 64 latin
+# characters, binlog contents are interpreted wrongly
+# which is leading to replication issues.
+#
+###############################################################################
+
+--source include/not_windows.inc
+--source include/master-slave.inc
+
+--let iter=1
+# Change iteration to 4 after fixing Bug #22280214
+while ($iter <= 2)
+{
+ --connection master
+ if ($iter == 1)
+ {
+ --echo Test case 1:- table name with one character latin name.
+ --let $tblname= REPEAT(CHAR(131),1)
+ }
+ if ($iter == 2)
+ {
+ --echo Test case 2:- table name and database names with one character latin name.
+ --let $tblname= REPEAT(CHAR(131),1),"`.`",REPEAT(CHAR(131),1)
+ --eval SET @s:=CONCAT("CREATE DATABASE `",REPEAT(CHAR(131),1),"`")
+ PREPARE STMT FROM @s; EXECUTE stmt;
+ }
+ # After fixing Bug #22280214 DATADIR LOCATION IS LIMITING
+ # IDENTIFIER MAX LENGTH, the following two tests (iter 3 and 4) can be
+ # uncommented.
+ #if ($iter == 3)
+ #{
+ # --echo Test case 3:- table name and database names with 64 latin characters name.
+ # --let $tblname= REPEAT(CHAR(131),64),"`.`", REPEAT(CHAR(131),64)
+ # --eval SET @s:=CONCAT("CREATE DATABASE `",REPEAT(CHAR(131),64),"`")
+ # PREPARE STMT FROM @s; EXECUTE stmt;
+ #}
+ #if ($iter == 4)
+ #{
+ # --echo Test case 4:- table name and database names with 64 Euro(€) characters.
+ # --let $tblname= REPEAT(CHAR(226,130,172),64),"`.`", REPEAT(CHAR(226,130,172),64)
+ # --eval SET @s:=CONCAT("CREATE DATABASE `",REPEAT(CHAR(226,130,172),64),"`")
+ # PREPARE STMT FROM @s; EXECUTE stmt;
+ #}
+ --eval SET @s:=CONCAT("CREATE TABLE `",$tblname,"` (a INT)")
+ PREPARE STMT FROM @s; EXECUTE stmt;
+ --eval SET @s:=CONCAT("INSERT INTO `",$tblname,"` VALUES (1)")
+ PREPARE STMT FROM @s; EXECUTE stmt;
+ --eval SET @s:=CONCAT("DROP TABLE `",$tblname, "`")
+ PREPARE STMT FROM @s; EXECUTE stmt;
+ if ($iter == 2)
+ {
+ --eval SET @s:=CONCAT("DROP DATABASE `",REPEAT(CHAR(131),1),"`")
+ PREPARE STMT FROM @s; EXECUTE stmt;
+ }
+ # After fixing Bug #22280214 DATADIR LOCATION IS LIMITING
+ # IDENTIFIER MAX LENGTH, the following two tests (iter 3 and 4) can be
+ # uncommented.
+ #if ($iter == 3)
+ #{
+ # --eval SET @s:=CONCAT("DROP DATABASE `",REPEAT(CHAR(131),64),"`")
+ # PREPARE STMT FROM @s; EXECUTE stmt;
+ #}
+ #if ($iter == 4)
+ #{
+ # --eval SET @s:=CONCAT("DROP DATABASE `",REPEAT(CHAR(226,130,172),64),"`")
+ # PREPARE STMT FROM @s; EXECUTE stmt;
+ #}
+ --sync_slave_with_master
+ --inc $iter
+}
+
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_parallel.test b/mysql-test/suite/rpl/t/rpl_parallel.test
index 01a46637f07..ace9e8e37f4 100644
--- a/mysql-test/suite/rpl/t/rpl_parallel.test
+++ b/mysql-test/suite/rpl/t/rpl_parallel.test
@@ -1423,6 +1423,7 @@ SELECT * FROM t6 ORDER BY a;
--connection server_1
INSERT INTO t2 VALUES (31);
+--let $gtid1= `SELECT @@LAST_GTID`
--source include/save_master_gtid.inc
--connection server_2
@@ -1438,6 +1439,7 @@ SET sql_log_bin= 1;
--connection server_1
INSERT INTO t2 VALUES (32);
+--let $gtid2= `SELECT @@LAST_GTID`
# Rotate the binlog; the bug is triggered when the master binlog file changes
# after the event group that causes the duplicate key error.
FLUSH LOGS;
@@ -1470,7 +1472,12 @@ START SLAVE SQL_THREAD;
SELECT * FROM t2 WHERE a >= 30 ORDER BY a;
# Skip the duplicate error, so we can proceed.
+--error ER_SLAVE_SKIP_NOT_IN_GTID
SET sql_slave_skip_counter= 1;
+--source include/stop_slave_io.inc
+--disable_query_log
+eval SET GLOBAL gtid_slave_pos = REPLACE(@@gtid_slave_pos, "$gtid1", "$gtid2");
+--enable_query_log
--source include/start_slave.inc
--source include/sync_with_master_gtid.inc
diff --git a/mysql-test/suite/rpl/t/rpl_semi_sync_uninstall_plugin.test b/mysql-test/suite/rpl/t/rpl_semi_sync_uninstall_plugin.test
index 4ee345e54ba..0f86789cced 100644
--- a/mysql-test/suite/rpl/t/rpl_semi_sync_uninstall_plugin.test
+++ b/mysql-test/suite/rpl/t/rpl_semi_sync_uninstall_plugin.test
@@ -57,6 +57,8 @@ DROP TABLE t1;
# possible at this state
--connection slave
--echo [connection slave]
+show global status like "Slave%_running";
+
UNINSTALL PLUGIN rpl_semi_sync_slave;
select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%';
@@ -64,6 +66,10 @@ select plugin_name,plugin_status from information_schema.plugins where plugin_na
# possible at this state
--connection master
--echo [connection master]
+
+# The following is to catch errors if the next uninstall plugin would succeed
+show global status like "Slave%_connect%";
+
UNINSTALL PLUGIN rpl_semi_sync_master;
select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%';
diff --git a/mysql-test/suite/rpl/t/rpl_unsafe_statements.test b/mysql-test/suite/rpl/t/rpl_unsafe_statements.test
new file mode 100644
index 00000000000..cbb4b54a220
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_unsafe_statements.test
@@ -0,0 +1,176 @@
+################################################################################
+# Bug#17047208 REPLICATION DIFFERENCE FOR MULTIPLE TRIGGERS
+# Problem: If DML invokes a trigger or a stored function that inserts into an
+# AUTO_INCREMENT column, that DML has to be marked as 'unsafe' statement. If the
+# tables are locked in the transaction prior to DML statement (using LOCK
+# TABLES), then the DML statement is not marked as 'unsafe' statement.
+
+# Steps to reproduce the reported test case (BINLOG_STMT_UNSAFE_AUTOINC_COLUMNS)
+# Case-1:
+# > Create a trigger on a table and do a insert in the trigger that updates
+# auto increment column
+# > A DML that executes the trigger in step.1 and check that DML is marked
+# as unsafe and DML is written into binlog using row format (in MBR)
+# > Execute the step 2 by locking the required tables prior to DML and check
+# that DML is marked as unsafe and DML is written into binlog using row
+# format (in MBR)
+#
+# This test script also adds test cases to cover few other unsafe statements.
+# Case-2: BINLOG_STMT_UNSAFE_WRITE_AUTOINC_SELECT
+# Case-3: BINLOG_STMT_UNSAFE_AUTOINC_NOT_FIRST
+# Case-4: BINLOG_STMT_UNSAFE_INSERT_TWO_KEYS
+################################################################################
+
+--source include/have_innodb.inc
+--source include/have_binlog_format_mixed.inc
+--source include/master-slave.inc
+
+# Case-1: BINLOG_STMT_UNSAFE_AUTOINC_COLUMNS
+# Statement is unsafe because it invokes a trigger or a
+# stored function that inserts into an AUTO_INCREMENT column.
+
+# Step-1.1: Create two tables, one with AUTO_INCREMENT column.
+CREATE TABLE t1(id INT AUTO_INCREMENT, i INT, PRIMARY KEY (id)) ENGINE=INNODB;
+CREATE TABLE t2(id INT AUTO_INCREMENT, i INT, PRIMARY KEY (id)) ENGINE=INNODB;
+
+# Step-1.2: Create a trigger that inserts into an AUTO_INCREMENT column.
+CREATE TRIGGER trig1 AFTER INSERT ON t1
+FOR EACH ROW
+ INSERT INTO t2(i) VALUES(new.i);
+
+# Step-1.3: Create some gap in auto increment value on master's t2 table
+# but not on slave (by doing rollback). Just in case if the unsafe statements
+# are written in statement format, diff tables will fail.
+START TRANSACTION;
+INSERT INTO t2(i) VALUES (1);
+ROLLBACK;
+
+# Step-1.4: Insert a tuple into table t1 that triggers trig1 which inserts
+# into an AUTO_INCREMENT column.
+INSERT INTO t1(i) VALUES(2);
+
+# Step-1.5: Repeat step 1.4 but using 'LOCK TABLES' logic.
+START TRANSACTION;
+LOCK TABLES t1 WRITE, t2 WRITE;
+INSERT INTO t1(i) VALUES(3);
+UNLOCK TABLES;
+COMMIT;
+
+# Step-1.6: Sync slave with master
+--sync_slave_with_master
+
+# Step-1.7: Diff master-slave tables to make sure everything is in sync.
+--let $diff_tables=master:t1, slave:t1
+--source include/diff_tables.inc
+
+--let $diff_tables=master:t2, slave:t2
+--source include/diff_tables.inc
+
+# Step-1.8: Cleanup
+--connection master
+DROP TABLE t1,t2;
+
+# Case-2: BINLOG_STMT_UNSAFE_WRITE_AUTOINC_SELECT
+# Statements writing to a table with an auto-increment column after selecting
+# from another table are unsafe because the order in which rows are retrieved
+# determines what (if any) rows will be written. This order cannot be
+# predicted and may differ on master and the slave.
+
+# Step-2.1: Create two tables, one with AUTO_INCREMENT column.
+CREATE TABLE t1(i INT) ENGINE=INNODB;
+CREATE TABLE t2(id INT AUTO_INCREMENT, i INT, PRIMARY KEY (id)) ENGINE=INNODB;
+
+# Step-2.2: Create some tuples in table t1.
+INSERT INTO t1 values (1), (2), (3);
+
+# Step-2.3: Create some gap in auto increment value on master's t2 table
+# but not on slave (by doing rollback). Just in case if the unsafe statements
+# are written in statement format, diff tables will fail.
+START TRANSACTION;
+INSERT INTO t2(i) VALUES (1);
+ROLLBACK;
+
+# Step-2.4: Insert into t2 (table with an auto-increment) by selecting tuples
+# from table t1.
+INSERT INTO t2(i) SELECT i FROM t1;
+
+# Step-2.5: Repeat step 2.4 but now with 'LOCK TABLES' logic.
+START TRANSACTION;
+LOCK TABLES t2 WRITE, t1 READ;
+INSERT INTO t2(i) SELECT i FROM t1;
+UNLOCK TABLES;
+COMMIT;
+
+# Step-2.6: Sync slave with master
+--sync_slave_with_master
+
+# Step-2.7: Diff master-slave tables to make sure everything is in sync.
+--let $diff_tables=master:t1, slave:t1
+--source include/diff_tables.inc
+
+--let $diff_tables=master:t2, slave:t2
+--source include/diff_tables.inc
+
+# Step-2.8: Cleanup
+--connection master
+DROP TABLE t1,t2;
+
+# Case-3: BINLOG_STMT_UNSAFE_AUTOINC_NOT_FIRST
+# INSERT into autoincrement field which is not the first part in the
+# composed primary key is unsafe
+#
+# Step-3.1: Create a table with auto increment column and a composed primary key
+# (second column is auto increment column). Such a definition is allowed only
+# with 'myisam' engine.
+CREATE TABLE t1(i int, id INT AUTO_INCREMENT, PRIMARY KEY (i, id)) ENGINE=MYISAM;
+
+# Step-3.2: Inserting into such a table is unsafe.
+INSERT INTO t1 (i) values (1);
+
+# Step-3.3: Repeat step 3.2, now with 'LOCK TABLES' logic.
+START TRANSACTION;
+LOCK TABLES t1 WRITE;
+INSERT INTO t1 (i) values (2);
+UNLOCK TABLES;
+COMMIT;
+
+# Step-3.4: Sync slave with master
+--sync_slave_with_master
+
+# Step-3.5: Diff master-slave tables to make sure everything is in sync.
+--let $diff_tables=master:t1, slave:t1
+--source include/diff_tables.inc
+
+# Step-3.6: Cleanup
+--connection master
+DROP TABLE t1;
+
+# Case-4: BINLOG_STMT_UNSAFE_INSERT_TWO_KEYS
+# INSERT... ON DUPLICATE KEY UPDATE on a table with more than one UNIQUE KEY
+# is unsafe Statement
+
+# Step-4.1: Create a table with two unique keys
+CREATE TABLE t1(i INT, j INT, UNIQUE KEY(i), UNIQUE KEY(j)) ENGINE=INNODB;
+
+# Step-4.2: Inserting into such a table is unsafe.
+INSERT INTO t1 (i,j) VALUES (1,2) ON DUPLICATE KEY UPDATE j=j+1;
+
+# Step-4.3: Repeat step 3.2, now with 'LOCK TABLES' logic.
+START TRANSACTION;
+LOCK TABLES t1 WRITE;
+INSERT INTO t1 (i,j) VALUES (1,2) ON DUPLICATE KEY UPDATE j=j+1;
+UNLOCK TABLES;
+COMMIT;
+
+# Step-4.4: Sync slave with master
+--sync_slave_with_master
+
+# Step-4.5: Diff master-slave tables to make sure everything is in sync.
+--let $diff_tables=master:t1, slave:t1
+--source include/diff_tables.inc
+
+# Step-4.6: Cleanup
+--connection master
+DROP TABLE t1;
+
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/sys_vars/r/innodb_monitor_disable_basic.result b/mysql-test/suite/sys_vars/r/innodb_monitor_disable_basic.result
index 654b6fc51dd..8c0af874228 100644
--- a/mysql-test/suite/sys_vars/r/innodb_monitor_disable_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_monitor_disable_basic.result
@@ -123,9 +123,6 @@ os_log_bytes_written disabled
os_log_fsyncs disabled
os_log_pending_fsyncs disabled
os_log_pending_writes disabled
-os_merge_blocks_written disabled
-os_merge_blocks_read disabled
-os_merge_blocks_merged disabled
trx_rw_commits disabled
trx_ro_commits disabled
trx_nl_ro_commits disabled
@@ -257,9 +254,6 @@ lock_row_lock_time disabled
lock_row_lock_time_max disabled
lock_row_lock_waits disabled
lock_row_lock_time_avg disabled
-os_merge_blocks_written disabled
-os_merge_blocks_read disabled
-os_merge_blocks_merged disabled
innodb_rwlock_s_spin_waits disabled
innodb_rwlock_x_spin_waits disabled
innodb_rwlock_s_spin_rounds disabled
@@ -298,9 +292,6 @@ os_log_bytes_written disabled
os_log_fsyncs disabled
os_log_pending_fsyncs enabled
os_log_pending_writes enabled
-os_merge_blocks_written disabled
-os_merge_blocks_read disabled
-os_merge_blocks_merged disabled
set global innodb_monitor_enable="";
ERROR 42000: Variable 'innodb_monitor_enable' can't be set to the value of ''
set global innodb_monitor_enable="_";
diff --git a/mysql-test/suite/sys_vars/r/innodb_monitor_enable_basic.result b/mysql-test/suite/sys_vars/r/innodb_monitor_enable_basic.result
index 654b6fc51dd..8c0af874228 100644
--- a/mysql-test/suite/sys_vars/r/innodb_monitor_enable_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_monitor_enable_basic.result
@@ -123,9 +123,6 @@ os_log_bytes_written disabled
os_log_fsyncs disabled
os_log_pending_fsyncs disabled
os_log_pending_writes disabled
-os_merge_blocks_written disabled
-os_merge_blocks_read disabled
-os_merge_blocks_merged disabled
trx_rw_commits disabled
trx_ro_commits disabled
trx_nl_ro_commits disabled
@@ -257,9 +254,6 @@ lock_row_lock_time disabled
lock_row_lock_time_max disabled
lock_row_lock_waits disabled
lock_row_lock_time_avg disabled
-os_merge_blocks_written disabled
-os_merge_blocks_read disabled
-os_merge_blocks_merged disabled
innodb_rwlock_s_spin_waits disabled
innodb_rwlock_x_spin_waits disabled
innodb_rwlock_s_spin_rounds disabled
@@ -298,9 +292,6 @@ os_log_bytes_written disabled
os_log_fsyncs disabled
os_log_pending_fsyncs enabled
os_log_pending_writes enabled
-os_merge_blocks_written disabled
-os_merge_blocks_read disabled
-os_merge_blocks_merged disabled
set global innodb_monitor_enable="";
ERROR 42000: Variable 'innodb_monitor_enable' can't be set to the value of ''
set global innodb_monitor_enable="_";
diff --git a/mysql-test/suite/sys_vars/r/innodb_monitor_reset_all_basic.result b/mysql-test/suite/sys_vars/r/innodb_monitor_reset_all_basic.result
index 654b6fc51dd..8c0af874228 100644
--- a/mysql-test/suite/sys_vars/r/innodb_monitor_reset_all_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_monitor_reset_all_basic.result
@@ -123,9 +123,6 @@ os_log_bytes_written disabled
os_log_fsyncs disabled
os_log_pending_fsyncs disabled
os_log_pending_writes disabled
-os_merge_blocks_written disabled
-os_merge_blocks_read disabled
-os_merge_blocks_merged disabled
trx_rw_commits disabled
trx_ro_commits disabled
trx_nl_ro_commits disabled
@@ -257,9 +254,6 @@ lock_row_lock_time disabled
lock_row_lock_time_max disabled
lock_row_lock_waits disabled
lock_row_lock_time_avg disabled
-os_merge_blocks_written disabled
-os_merge_blocks_read disabled
-os_merge_blocks_merged disabled
innodb_rwlock_s_spin_waits disabled
innodb_rwlock_x_spin_waits disabled
innodb_rwlock_s_spin_rounds disabled
@@ -298,9 +292,6 @@ os_log_bytes_written disabled
os_log_fsyncs disabled
os_log_pending_fsyncs enabled
os_log_pending_writes enabled
-os_merge_blocks_written disabled
-os_merge_blocks_read disabled
-os_merge_blocks_merged disabled
set global innodb_monitor_enable="";
ERROR 42000: Variable 'innodb_monitor_enable' can't be set to the value of ''
set global innodb_monitor_enable="_";
diff --git a/mysql-test/suite/sys_vars/r/innodb_monitor_reset_basic.result b/mysql-test/suite/sys_vars/r/innodb_monitor_reset_basic.result
index 654b6fc51dd..8c0af874228 100644
--- a/mysql-test/suite/sys_vars/r/innodb_monitor_reset_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_monitor_reset_basic.result
@@ -123,9 +123,6 @@ os_log_bytes_written disabled
os_log_fsyncs disabled
os_log_pending_fsyncs disabled
os_log_pending_writes disabled
-os_merge_blocks_written disabled
-os_merge_blocks_read disabled
-os_merge_blocks_merged disabled
trx_rw_commits disabled
trx_ro_commits disabled
trx_nl_ro_commits disabled
@@ -257,9 +254,6 @@ lock_row_lock_time disabled
lock_row_lock_time_max disabled
lock_row_lock_waits disabled
lock_row_lock_time_avg disabled
-os_merge_blocks_written disabled
-os_merge_blocks_read disabled
-os_merge_blocks_merged disabled
innodb_rwlock_s_spin_waits disabled
innodb_rwlock_x_spin_waits disabled
innodb_rwlock_s_spin_rounds disabled
@@ -298,9 +292,6 @@ os_log_bytes_written disabled
os_log_fsyncs disabled
os_log_pending_fsyncs enabled
os_log_pending_writes enabled
-os_merge_blocks_written disabled
-os_merge_blocks_read disabled
-os_merge_blocks_merged disabled
set global innodb_monitor_enable="";
ERROR 42000: Variable 'innodb_monitor_enable' can't be set to the value of ''
set global innodb_monitor_enable="_";
diff --git a/mysql-test/suite/sys_vars/r/innodb_tmpdir_basic.result b/mysql-test/suite/sys_vars/r/innodb_tmpdir_basic.result
new file mode 100644
index 00000000000..be10c93b56b
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/innodb_tmpdir_basic.result
@@ -0,0 +1,35 @@
+SET @start_global_value = @@global.innodb_tmpdir;
+SELECT @start_global_value;
+@start_global_value
+NULL
+select @@session.innodb_tmpdir;
+@@session.innodb_tmpdir
+NULL
+show global variables like 'innodb_tmpdir';
+Variable_name Value
+innodb_tmpdir
+show session variables like 'innodb_tmpdir';
+Variable_name Value
+innodb_tmpdir
+select * from information_schema.global_variables where variable_name='innodb_tmpdir';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_TMPDIR
+select * from information_schema.session_variables where variable_name='innodb_tmpdir';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_TMPDIR
+set global innodb_tmpdir=@@global.tmpdir;
+set session innodb_tmpdir=@@global.tmpdir;
+set global innodb_tmpdir=1.1;
+ERROR 42000: Incorrect argument type to variable 'innodb_tmpdir'
+set global innodb_tmpdir=1e1;
+ERROR 42000: Incorrect argument type to variable 'innodb_tmpdir'
+set global innodb_tmpdir=repeat('a',1000);
+ERROR 42000: Variable 'innodb_tmpdir' can't be set to the value of 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
+show warnings;
+Level Code Message
+Warning 1210 Path length should not exceed 512 bytes
+Error 1231 Variable 'innodb_tmpdir' can't be set to the value of 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
+SET @@global.innodb_tmpdir = @start_global_value;
+SELECT @@global.innodb_tmpdir;
+@@global.innodb_tmpdir
+NULL
diff --git a/mysql-test/suite/sys_vars/t/innodb_tmpdir_basic.test b/mysql-test/suite/sys_vars/t/innodb_tmpdir_basic.test
new file mode 100644
index 00000000000..3c547152e27
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_tmpdir_basic.test
@@ -0,0 +1,48 @@
+--source include/have_innodb.inc
+
+if (`select plugin_auth_version <= "5.6.28-MariaDB-76.1" from information_schema.plugins where plugin_name='innodb'`)
+{
+ --skip Not fixed in XtraDB as of 5.6.28-MariaDB-76.1 or earlier
+}
+
+SET @start_global_value = @@global.innodb_tmpdir;
+SELECT @start_global_value;
+
+#
+# exists as global and session
+#
+select @@session.innodb_tmpdir;
+
+show global variables like 'innodb_tmpdir';
+show session variables like 'innodb_tmpdir';
+
+select * from information_schema.global_variables where variable_name='innodb_tmpdir';
+select * from information_schema.session_variables where variable_name='innodb_tmpdir';
+#
+# Show that it is writable
+#
+
+set global innodb_tmpdir=@@global.tmpdir;
+set session innodb_tmpdir=@@global.tmpdir;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global innodb_tmpdir=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global innodb_tmpdir=1e1;
+
+#
+# path len more than 512
+#
+--error ER_WRONG_VALUE_FOR_VAR
+set global innodb_tmpdir=repeat('a',1000);
+show warnings;
+
+#
+# Cleanup
+#
+
+SET @@global.innodb_tmpdir = @start_global_value;
+SELECT @@global.innodb_tmpdir;
diff --git a/mysql-test/suite/vcol/inc/vcol_ins_upd.inc b/mysql-test/suite/vcol/inc/vcol_ins_upd.inc
index 8d0a51f42c0..d9a1e062870 100644
--- a/mysql-test/suite/vcol/inc/vcol_ins_upd.inc
+++ b/mysql-test/suite/vcol/inc/vcol_ins_upd.inc
@@ -287,3 +287,30 @@ select * from t1;
set sql_warnings = 0;
drop table t1;
+
+--echo #
+--echo # MDEV-9093: Persistent computed column is not updated when
+--echo # update query contains join
+--echo #
+
+CREATE TABLE `t1` (
+ `id` bigint(20) NOT NULL,
+ `name` varchar(254) DEFAULT NULL,
+ `name_hash` varchar(64) AS (sha1(name)) PERSISTENT,
+ PRIMARY KEY (`id`)
+);
+
+insert into t1(id,name) values (2050, 'name1'),(2051, 'name2'),(2041, 'name3');
+
+create table t2 (id bigint);
+insert into t2 values (2050),(2051),(2041);
+
+select * from t1;
+
+update t1 join t2 using(id) set name = concat(name,
+'+1') where t1.id in (2051,2041);
+
+select * from t1;
+
+drop table t1,t2;
+
diff --git a/mysql-test/suite/vcol/r/alter_inplace-9045.result b/mysql-test/suite/vcol/r/alter_inplace-9045.result
new file mode 100644
index 00000000000..1560d830f42
--- /dev/null
+++ b/mysql-test/suite/vcol/r/alter_inplace-9045.result
@@ -0,0 +1,44 @@
+create table t1(id int auto_increment primary key, handle int, data bigint not null default 0) engine = innodb;
+insert into t1(handle) values(12),(54),(NULL);
+select *, md5(handle) from t1;
+id handle data md5(handle)
+1 12 0 c20ad4d76fe97759aa27a0c99bff6710
+2 54 0 a684eceee76fc522773286a895bc8436
+3 NULL 0 NULL
+alter table t1 add index handle(handle), algorithm=inplace;
+alter table t1 add column hash varchar(32) as (md5(handle)) persistent, algorithm=inplace;
+ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY.
+alter table t1 add column hash varchar(32) as (md5(handle)) persistent, add unique index hash(hash), algorithm=inplace;
+ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY.
+alter table t1 add column hash varchar(32) as (md5(handle)) persistent, add unique index hash(hash), algorithm=copy;
+select * from t1;
+id handle data hash
+1 12 0 c20ad4d76fe97759aa27a0c99bff6710
+2 54 0 a684eceee76fc522773286a895bc8436
+3 NULL 0 NULL
+alter table t1 modify column hash varchar(32) as (md5(handle+1)) persistent, algorithm=inplace;
+ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY.
+alter table t1 modify column hash varchar(32) as (md5(handle+1)) persistent, algorithm=copy;
+select * from t1;
+id handle data hash
+1 12 0 c51ce410c124a10e0db5e4b97fc2af39
+2 54 0 b53b3a3d6ab90ce0268229151c9bde11
+3 NULL 0 NULL
+alter table t1 modify column handle int not null, algorithm=inplace;
+ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY.
+alter table t1 modify column handle int not null, algorithm=copy;
+Warnings:
+Warning 1265 Data truncated for column 'handle' at row 3
+select * from t1;
+id handle data hash
+1 12 0 c51ce410c124a10e0db5e4b97fc2af39
+2 54 0 b53b3a3d6ab90ce0268229151c9bde11
+3 0 0 c4ca4238a0b923820dcc509a6f75849b
+alter table t1 drop index handle, algorithm=inplace;
+create index data on t1(data) algorithm=inplace;
+alter table t1 drop column data, algorithm=inplace;
+alter table t1 add column sha varchar(32) as (sha1(handle)) persistent, algorithm=inplace;
+ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY.
+alter table t1 add column sha varchar(32), algorithm=inplace;
+alter table t1 drop column hash, algorithm=inplace;
+drop table t1;
diff --git a/mysql-test/suite/vcol/r/innodb_autoinc_vcol.result b/mysql-test/suite/vcol/r/innodb_autoinc_vcol.result
new file mode 100644
index 00000000000..f2d6b4105ff
--- /dev/null
+++ b/mysql-test/suite/vcol/r/innodb_autoinc_vcol.result
@@ -0,0 +1,16 @@
+create table t1 (c2 int as (-c1), c1 int primary key auto_increment) engine=innodb;
+insert into t1(c1) values (null),(null),(null);
+select * from t1;
+c2 c1
+-1 1
+-2 2
+-3 3
+alter table t1 auto_increment = 3;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `c2` int(11) AS (-c1) VIRTUAL,
+ `c1` int(11) NOT NULL AUTO_INCREMENT,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1
+drop table t1;
diff --git a/mysql-test/suite/vcol/r/vcol_ins_upd_innodb.result b/mysql-test/suite/vcol/r/vcol_ins_upd_innodb.result
index 44fcae7a6e5..af03cc4d482 100644
--- a/mysql-test/suite/vcol/r/vcol_ins_upd_innodb.result
+++ b/mysql-test/suite/vcol/r/vcol_ins_upd_innodb.result
@@ -425,3 +425,29 @@ select * from t1;
a b c d
set sql_warnings = 0;
drop table t1;
+#
+# MDEV-9093: Persistent computed column is not updated when
+# update query contains join
+#
+CREATE TABLE `t1` (
+`id` bigint(20) NOT NULL,
+`name` varchar(254) DEFAULT NULL,
+`name_hash` varchar(64) AS (sha1(name)) PERSISTENT,
+PRIMARY KEY (`id`)
+);
+insert into t1(id,name) values (2050, 'name1'),(2051, 'name2'),(2041, 'name3');
+create table t2 (id bigint);
+insert into t2 values (2050),(2051),(2041);
+select * from t1;
+id name name_hash
+2041 name3 1aefcd1b0f39da45fa1fd7236f683c907c15ef82
+2050 name1 9b46b0dd3a8083c070c3b9953bb5f3f95c5ab4da
+2051 name2 39ea84acf1fef629fef18a9c6f5799bba32ecc25
+update t1 join t2 using(id) set name = concat(name,
+'+1') where t1.id in (2051,2041);
+select * from t1;
+id name name_hash
+2041 name3+1 93c9096df48221428de46e146abc9f4f94bf7d2e
+2050 name1 9b46b0dd3a8083c070c3b9953bb5f3f95c5ab4da
+2051 name2+1 fd4f236320db3956a5ec073c5ec39707d7f05708
+drop table t1,t2;
diff --git a/mysql-test/suite/vcol/r/vcol_ins_upd_myisam.result b/mysql-test/suite/vcol/r/vcol_ins_upd_myisam.result
index 66745862c22..351dfd2858c 100644
--- a/mysql-test/suite/vcol/r/vcol_ins_upd_myisam.result
+++ b/mysql-test/suite/vcol/r/vcol_ins_upd_myisam.result
@@ -363,3 +363,29 @@ select * from t1;
a b c d
set sql_warnings = 0;
drop table t1;
+#
+# MDEV-9093: Persistent computed column is not updated when
+# update query contains join
+#
+CREATE TABLE `t1` (
+`id` bigint(20) NOT NULL,
+`name` varchar(254) DEFAULT NULL,
+`name_hash` varchar(64) AS (sha1(name)) PERSISTENT,
+PRIMARY KEY (`id`)
+);
+insert into t1(id,name) values (2050, 'name1'),(2051, 'name2'),(2041, 'name3');
+create table t2 (id bigint);
+insert into t2 values (2050),(2051),(2041);
+select * from t1;
+id name name_hash
+2050 name1 9b46b0dd3a8083c070c3b9953bb5f3f95c5ab4da
+2051 name2 39ea84acf1fef629fef18a9c6f5799bba32ecc25
+2041 name3 1aefcd1b0f39da45fa1fd7236f683c907c15ef82
+update t1 join t2 using(id) set name = concat(name,
+'+1') where t1.id in (2051,2041);
+select * from t1;
+id name name_hash
+2050 name1 9b46b0dd3a8083c070c3b9953bb5f3f95c5ab4da
+2051 name2+1 fd4f236320db3956a5ec073c5ec39707d7f05708
+2041 name3+1 93c9096df48221428de46e146abc9f4f94bf7d2e
+drop table t1,t2;
diff --git a/mysql-test/suite/vcol/t/alter_inplace-9045.test b/mysql-test/suite/vcol/t/alter_inplace-9045.test
new file mode 100644
index 00000000000..8f59ba75bce
--- /dev/null
+++ b/mysql-test/suite/vcol/t/alter_inplace-9045.test
@@ -0,0 +1,31 @@
+#
+# MDEV-9045 Inconsistent handling of "ALGORITHM=INPLACE" with PERSISTENT generated columns
+#
+--source include/have_innodb.inc
+
+create table t1(id int auto_increment primary key, handle int, data bigint not null default 0) engine = innodb;
+insert into t1(handle) values(12),(54),(NULL);
+select *, md5(handle) from t1;
+alter table t1 add index handle(handle), algorithm=inplace;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+alter table t1 add column hash varchar(32) as (md5(handle)) persistent, algorithm=inplace;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+alter table t1 add column hash varchar(32) as (md5(handle)) persistent, add unique index hash(hash), algorithm=inplace;
+alter table t1 add column hash varchar(32) as (md5(handle)) persistent, add unique index hash(hash), algorithm=copy;
+select * from t1;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+alter table t1 modify column hash varchar(32) as (md5(handle+1)) persistent, algorithm=inplace;
+alter table t1 modify column hash varchar(32) as (md5(handle+1)) persistent, algorithm=copy;
+select * from t1;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+alter table t1 modify column handle int not null, algorithm=inplace;
+alter table t1 modify column handle int not null, algorithm=copy;
+select * from t1;
+alter table t1 drop index handle, algorithm=inplace;
+create index data on t1(data) algorithm=inplace;
+alter table t1 drop column data, algorithm=inplace;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+alter table t1 add column sha varchar(32) as (sha1(handle)) persistent, algorithm=inplace;
+alter table t1 add column sha varchar(32), algorithm=inplace;
+alter table t1 drop column hash, algorithm=inplace;
+drop table t1;
diff --git a/mysql-test/suite/vcol/t/innodb_autoinc_vcol.test b/mysql-test/suite/vcol/t/innodb_autoinc_vcol.test
new file mode 100644
index 00000000000..2f2ac3d08e1
--- /dev/null
+++ b/mysql-test/suite/vcol/t/innodb_autoinc_vcol.test
@@ -0,0 +1,9 @@
+--source include/have_innodb.inc
+
+create table t1 (c2 int as (-c1), c1 int primary key auto_increment) engine=innodb;
+insert into t1(c1) values (null),(null),(null);
+select * from t1;
+alter table t1 auto_increment = 3;
+show create table t1;
+drop table t1;
+
diff --git a/mysql-test/t/alter_table_online.test b/mysql-test/t/alter_table_online.test
index 20dbfe9c46a..a160abc8fe2 100644
--- a/mysql-test/t/alter_table_online.test
+++ b/mysql-test/t/alter_table_online.test
@@ -7,22 +7,16 @@
drop table if exists t1,t2,t3;
--enable_warnings
#
-# Test of things that can not be done online
+# Test of things that can be done online
#
create table t1 (a int not null primary key, b int, c varchar(80), e enum('a','b'));
insert into t1 (a) values (1),(2),(3);
---error ER_ALTER_OPERATION_NOT_SUPPORTED
alter online table t1 modify b int default 5;
---error ER_ALTER_OPERATION_NOT_SUPPORTED
alter online table t1 change b new_name int;
---error ER_ALTER_OPERATION_NOT_SUPPORTED
alter online table t1 modify e enum('a','b','c');
---error ER_ALTER_OPERATION_NOT_SUPPORTED
alter online table t1 comment "new comment";
---error ER_ALTER_OPERATION_NOT_SUPPORTED
-alter online table t1 rename to t2;
# No OPs
@@ -68,11 +62,14 @@ alter online table t1 modify c varchar(100);
alter online table t1 add f int;
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
alter online table t1 engine=memory;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+alter online table t1 rename to t2;
alter table t1 engine=innodb;
alter table t1 add index (b);
alter online table t1 add index c (c);
alter online table t1 drop index b;
+alter online table t1 comment "new comment";
drop table t1;
create temporary table t1 (a int not null primary key, b int, c varchar(80), e enum('a','b'));
diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test
index e30ea1b240c..ded9096900c 100644
--- a/mysql-test/t/create.test
+++ b/mysql-test/t/create.test
@@ -2062,6 +2062,27 @@ create table t1(a enum('',''));
drop table t1;
set @@session.collation_server=default;
+--echo #
+--echo # MDEV-7765: Crash (Assertion `!table || (!table->write_set ||
+--echo # bitmap_is_set(table->write_set, field_index) ||
+--echo # bitmap_is_set(table->vcol_set, field_index))' fails)
+--echo # on using function over not created table
+--echo #
+
+DELIMITER |;
+CREATE function f1() returns int
+BEGIN
+ declare n int;
+ set n:= (select count(*) from t1);
+ return n;
+end|
+DELIMITER ;|
+-- error ER_NO_SUCH_TABLE
+create table t1 as select f1();
+drop function f1;
+
+--echo End of 5.5 tests
+
#
# MDEV-4880 Attempt to create a table without columns produces ER_ILLEGAL_HA instead of ER_TABLE_MUST_HAVE_COLUMNS
#
diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test
index f8b08142e0f..2f34e47823b 100644
--- a/mysql-test/t/ctype_utf8.test
+++ b/mysql-test/t/ctype_utf8.test
@@ -1582,8 +1582,7 @@ SET NAMES utf8;
SET NAMES utf8;
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (0), (0), (1), (0), (0);
---error ER_DUP_ENTRY
-SELECT COUNT(*) FROM t1, t1 t2
+SELECT COUNT(*) FROM t1, t1 t2
GROUP BY INSERT('', t2.a, t1.a, (@@global.max_binlog_size));
DROP TABLE t1;
@@ -1668,6 +1667,17 @@ SELECT * FROM t2;
DROP TABLE t2, t1;
--echo #
+--echo # MDEV-9319 ALTER from a bigger to a smaller blob type truncates too much data
+--echo #
+SET NAMES utf8;
+CREATE TABLE t1 (a TEXT CHARACTER SET utf8);
+INSERT INTO t1 VALUES (REPEAT('A',100));
+SELECT OCTET_LENGTH(a) FROM t1;
+ALTER TABLE t1 MODIFY a TINYTEXT CHARACTER SET utf8;
+SELECT OCTET_LENGTH(a),a FROM t1;
+DROP TABLE t1;
+
+--echo #
--echo # End of 5.5 tests
--echo #
diff --git a/mysql-test/t/ctype_utf8mb4.test b/mysql-test/t/ctype_utf8mb4.test
index 7a3c67bb417..d59c6d397fc 100644
--- a/mysql-test/t/ctype_utf8mb4.test
+++ b/mysql-test/t/ctype_utf8mb4.test
@@ -1810,6 +1810,18 @@ DROP TABLE t1;
--echo # End of test for Bug#13581962,Bug#14096619
--echo #
+--echo # MDEV-9319 ALTER from a bigger to a smaller blob type truncates too much data
+--echo #
+SET NAMES utf8mb4;
+CREATE TABLE t1 (a TEXT CHARACTER SET utf8mb4);
+INSERT INTO t1 VALUES (REPEAT('😎',100));
+SELECT OCTET_LENGTH(a) FROM t1;
+ALTER TABLE t1 MODIFY a TINYTEXT CHARACTER SET utf8mb4;
+SELECT OCTET_LENGTH(a),a FROM t1;
+DROP TABLE t1;
+
+
+--echo #
--echo # End of 5.5 tests
--echo #
diff --git a/mysql-test/t/derived.test b/mysql-test/t/derived.test
index d98e7b56905..a7739dcf8a7 100644
--- a/mysql-test/t/derived.test
+++ b/mysql-test/t/derived.test
@@ -538,4 +538,294 @@ select x.id, message from (select id from t1) x left join
where coalesce(message,0) <> 0;
drop table t1,t2;
+--echo #
+--echo # MDEV-7827: Assertion `!table || (!table->read_set ||
+--echo # bitmap_is_set(table->read_set, field_index))' failed
+--echo # in Field_long::val_str on EXPLAIN EXTENDED
+--echo #
+
+CREATE TABLE t1 (f1 INT, f2 INT, KEY(f2)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (6,9);
+
+CREATE TABLE t2 (f3 INT) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (2),(0);
+
+EXPLAIN EXTENDED
+SELECT f1 FROM ( SELECT * FROM t1 ) AS sq
+WHERE f1 IN (
+ SELECT f3 FROM t2 WHERE f2 IN (
+ SELECT f3 FROM t2 HAVING f3 >= 8
+ )
+);
+
+DROP TABLE t2,t1;
+
+--echo #
+--echo # MDEV-9462: Out of memory using explain on 2 empty tables
+--echo #
+
+CREATE TABLE `t1` (
+ `REC_GROUP` char(2) DEFAULT NULL,
+ `CLIENT_INFO` text CHARACTER SET utf8,
+ `NAME` text,
+ `PHONE_NUMBER` text,
+ `ATTENTION_NAME` text,
+ `PAYMENT_TERM` text CHARACTER SET utf8,
+ `CREDIT_LIMIT` decimal(12,2) DEFAULT NULL,
+ `LAST_PAY_DATE` text CHARACTER SET utf8,
+ `TOTAL` double DEFAULT NULL,
+ `TOTAL_MCL` double DEFAULT NULL,
+ `TOTAL_MFS` double DEFAULT NULL,
+ `TOTAL_MIS` double DEFAULT NULL,
+ `BEFORE_DUE_7_MCL` double DEFAULT NULL,
+ `BEFORE_DUE_7_MFS` double DEFAULT NULL,
+ `BEFORE_DUE_7_MIS` double DEFAULT NULL,
+ `PER1_MCL` double DEFAULT NULL,
+ `PER1_MFS` double DEFAULT NULL,
+ `PER1_MIS` double DEFAULT NULL,
+ `PER2_MCL` double DEFAULT NULL,
+ `PER2_MFS` double DEFAULT NULL,
+ `PER2_MIS` double DEFAULT NULL,
+ `PER3_MCL` double DEFAULT NULL,
+ `PER3_MFS` double DEFAULT NULL,
+ `PER3_MIS` double DEFAULT NULL,
+ `PER4_MCL` double DEFAULT NULL,
+ `PER4_MFS` double DEFAULT NULL,
+ `PER4_MIS` double DEFAULT NULL,
+ `PER5_MCL` double DEFAULT NULL,
+ `PER5_MFS` double DEFAULT NULL,
+ `PER5_MIS` double DEFAULT NULL,
+ `PER6_MCL` double DEFAULT NULL,
+ `PER6_MFS` double DEFAULT NULL,
+ `PER6_MIS` double DEFAULT NULL,
+ `PER7_MCL` double DEFAULT NULL,
+ `PER7_MFS` double DEFAULT NULL,
+ `PER7_MIS` double DEFAULT NULL,
+ `BEFORE_DUE_7` double DEFAULT NULL,
+ `PER1` double DEFAULT NULL,
+ `PER2` double DEFAULT NULL,
+ `PER3` double DEFAULT NULL,
+ `PER4` double DEFAULT NULL,
+ `PER5` double DEFAULT NULL,
+ `PER6` double DEFAULT NULL,
+ `PER7` double DEFAULT NULL,
+ `REF` varchar(30) DEFAULT NULL,
+ `TYPE` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL
+);
+
+
+CREATE TABLE `t2` (
+ `RECEIVABLE_GROUP` char(2) DEFAULT NULL,
+ `CLIENT_NUMBER` varchar(35) DEFAULT NULL,
+ `CLIENT_NAME` varchar(73) DEFAULT NULL,
+ `PHONE_NUMBER` char(12) DEFAULT NULL,
+ `ATTENTION_NAME` char(26) DEFAULT NULL,
+ `PAYMENT_TERM` varchar(26) CHARACTER SET utf8 DEFAULT NULL,
+ `CREDIT_LIMIT` decimal(12,2) DEFAULT NULL,
+ `LAST_PAY_DATE` varchar(42) CHARACTER SET utf8 DEFAULT NULL,
+ `TOTAL` decimal(12,2) DEFAULT NULL,
+ `BEFORE_DUE_7` decimal(12,2) DEFAULT NULL,
+ `PER1` decimal(12,2) DEFAULT NULL,
+ `PER2` decimal(12,2) DEFAULT NULL,
+ `PER3` decimal(12,2) DEFAULT NULL,
+ `PER4` decimal(12,2) DEFAULT NULL,
+ `PER5` decimal(12,2) DEFAULT NULL,
+ `PER6` decimal(12,2) DEFAULT NULL,
+ `PER7` decimal(12,2) DEFAULT NULL,
+ `DIVISION` varchar(3) CHARACTER SET utf8 NOT NULL,
+ `CLIENT_INFO` varchar(294) CHARACTER SET utf8 DEFAULT NULL,
+ `EXCHANGE_RATE` double NOT NULL,
+ `REF` varchar(30) DEFAULT NULL
+);
+
+explain
+SELECT A.RECEIVABLE_GROUP,A.CLIENT_INFO,A.CLIENT_NAME,A.PHONE_NUMBER,A.ATTENTION_NAME,A.PAYMENT_TERM,A.CREDIT_LIMIT,A.LAST_PAY_DATE,A.TOTAL,
+COALESCE(B.TOTAL_MCL,0) AS TOTAL_MCL,
+COALESCE(C.TOTAL_MFS,0) AS TOTAL_MFS,
+COALESCE(D.TOTAL_MIS,0) AS TOTAL_MIS,
+COALESCE(F.BEFORE_DUE_7_MCL,0) AS BEFORE_DUE_7_MCL,
+COALESCE(G.BEFORE_DUE_7_MFS,0) AS BEFORE_DUE_7_MFS,
+COALESCE(H.BEFORE_DUE_7_MIS,0) AS BEFORE_DUE_7_MIS,
+COALESCE(I.PER1_MCL,0) AS PER1_MCL,
+COALESCE(J.PER1_MFS,0) AS PER1_MFS,
+COALESCE(K.PER1_MIS,0) AS PER1_MIS,
+COALESCE(L.PER2_MCL,0) AS PER2_MCL,
+COALESCE(M.PER2_MFS,0) AS PER2_MFS,
+COALESCE(N.PER2_MIS,0) AS PER2_MIS,
+COALESCE(O.PER3_MCL,0) AS PER3_MCL,
+COALESCE(P.PER3_MFS,0) AS PER3_MFS,
+COALESCE(R.PER3_MIS,0) AS PER3_MIS,
+COALESCE(S.PER4_MCL,0) AS PER4_MCL,
+COALESCE(T.PER4_MFS,0) AS PER4_MFS,
+COALESCE(U.PER4_MIS,0) AS PER4_MIS,
+COALESCE(V.PER5_MCL,0) AS PER5_MCL,
+COALESCE(X.PER5_MFS,0) AS PER5_MFS,
+COALESCE(Z.PER5_MIS,0) AS PER5_MIS,
+COALESCE(Q.PER6_MCL,0) AS PER6_MCL,
+COALESCE(Y.PER6_MFS,0) AS PER6_MFS,
+COALESCE(W.PER6_MIS,0) AS PER6_MIS,
+COALESCE(A1.PER7_MCL,0) AS PER7_MCL,
+COALESCE(B1.PER7_MFS,0) AS PER7_MFS,
+COALESCE(C1.PER7_MIS,0) AS PER7_MIS,
+A.BEFORE_DUE_7,A.PER1,A.PER2,A.PER3,A.PER4,A.PER5,A.PER6,A.PER7,
+CONCAT(A.DIVISION,'-',A.CLIENT_NUMBER) AS REF,"2" AS TYPE FROM
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,
+GROUP_CONCAT(DISTINCT CLIENT_INFO SEPARATOR '<br>') AS CLIENT_INFO,
+GROUP_CONCAT(DISTINCT CLIENT_NAME SEPARATOR '<br>') AS CLIENT_NAME,
+GROUP_CONCAT( DISTINCT `PHONE_NUMBER` SEPARATOR '<br>' ) AS PHONE_NUMBER ,
+GROUP_CONCAT( DISTINCT `ATTENTION_NAME` SEPARATOR '<br>' ) AS ATTENTION_NAME,
+GROUP_CONCAT( DISTINCT `PAYMENT_TERM` SEPARATOR '<br>' ) AS PAYMENT_TERM,
+CREDIT_LIMIT ,
+GROUP_CONCAT( `LAST_PAY_DATE` SEPARATOR '<br>' ) AS LAST_PAY_DATE,
+SUM( `TOTAL`*EXCHANGE_RATE ) AS TOTAL,
+SUM( `BEFORE_DUE_7`*EXCHANGE_RATE ) AS BEFORE_DUE_7,
+SUM( `PER1`*EXCHANGE_RATE ) AS PER1,
+SUM( `PER2`*EXCHANGE_RATE ) AS PER2,
+SUM( `PER3`*EXCHANGE_RATE ) AS PER3,
+SUM( `PER4`*EXCHANGE_RATE ) AS PER4,
+SUM( `PER5`*EXCHANGE_RATE ) AS PER5,
+SUM( `PER6`*EXCHANGE_RATE ) AS PER6,
+SUM( `PER7`*EXCHANGE_RATE ) AS PER7
+FROM `t2`
+WHERE REF IS NULL GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS A
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( `TOTAL`*EXCHANGE_RATE ) AS TOTAL_MCL
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MCL" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS B ON A.CLIENT_NUMBER=B.CLIENT_NUMBER AND
+A.DIVISION=B.DIVISION AND A.RECEIVABLE_GROUP=B.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=B.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( `TOTAL`*EXCHANGE_RATE ) AS TOTAL_MFS
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MFS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS C ON A.CLIENT_NUMBER=C.CLIENT_NUMBER
+AND
+A.DIVISION=C.DIVISION AND A.RECEIVABLE_GROUP=C.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=C.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( `TOTAL`*EXCHANGE_RATE ) AS TOTAL_MIS
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MIS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS D ON A.CLIENT_NUMBER=D.CLIENT_NUMBER AND
+A.DIVISION=D.DIVISION AND A.RECEIVABLE_GROUP=D.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=D.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( BEFORE_DUE_7*EXCHANGE_RATE ) AS BEFORE_DUE_7_MCL
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MCL" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS F ON A.CLIENT_NUMBER=F.CLIENT_NUMBER AND
+A.DIVISION=F.DIVISION AND A.RECEIVABLE_GROUP=F.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=F.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( BEFORE_DUE_7*EXCHANGE_RATE ) AS BEFORE_DUE_7_MFS
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MFS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS G ON A.CLIENT_NUMBER=G.CLIENT_NUMBER AND
+A.DIVISION=G.DIVISION AND A.RECEIVABLE_GROUP=G.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=G.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( BEFORE_DUE_7*EXCHANGE_RATE ) AS BEFORE_DUE_7_MIS
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MIS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS H ON A.CLIENT_NUMBER=H.CLIENT_NUMBER AND
+A.DIVISION=H.DIVISION AND A.RECEIVABLE_GROUP=H.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=H.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER1*EXCHANGE_RATE ) AS PER1_MCL
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MCL" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS I ON A.CLIENT_NUMBER=I.CLIENT_NUMBER AND
+A.DIVISION=I.DIVISION AND A.RECEIVABLE_GROUP=I.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=I.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER1*EXCHANGE_RATE ) AS PER1_MFS
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MFS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS J ON A.CLIENT_NUMBER=J.CLIENT_NUMBER AND
+A.DIVISION=J.DIVISION AND A.RECEIVABLE_GROUP=J.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=J.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER1*EXCHANGE_RATE ) AS PER1_MIS
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MIS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS K ON A.CLIENT_NUMBER=K.CLIENT_NUMBER AND
+A.DIVISION=K.DIVISION AND A.RECEIVABLE_GROUP=K.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=K.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER2*EXCHANGE_RATE ) AS PER2_MCL
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MCL" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS L ON A.CLIENT_NUMBER=L.CLIENT_NUMBER AND
+A.DIVISION=L.DIVISION AND A.RECEIVABLE_GROUP=L.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=L.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER2*EXCHANGE_RATE ) AS PER2_MFS
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MFS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS M ON A.CLIENT_NUMBER=M.CLIENT_NUMBER AND
+A.DIVISION=M.DIVISION AND A.RECEIVABLE_GROUP=M.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=M.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER2*EXCHANGE_RATE ) AS PER2_MIS
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MIS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS N ON A.CLIENT_NUMBER=N.CLIENT_NUMBER AND
+A.DIVISION=N.DIVISION AND A.RECEIVABLE_GROUP=N.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=N.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER3*EXCHANGE_RATE ) AS PER3_MCL
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MCL" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS O ON A.CLIENT_NUMBER=O.CLIENT_NUMBER AND
+A.DIVISION=O.DIVISION AND A.RECEIVABLE_GROUP=O.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=O.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER3*EXCHANGE_RATE ) AS PER3_MFS
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MFS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS P ON A.CLIENT_NUMBER=P.CLIENT_NUMBER AND
+A.DIVISION=P.DIVISION AND A.RECEIVABLE_GROUP=P.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=P.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER3*EXCHANGE_RATE ) AS PER3_MIS
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MIS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS R ON A.CLIENT_NUMBER=R.CLIENT_NUMBER AND
+A.DIVISION=R.DIVISION AND A.RECEIVABLE_GROUP=R.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=R.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER4*EXCHANGE_RATE ) AS PER4_MCL
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MCL" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS S ON A.CLIENT_NUMBER=S.CLIENT_NUMBER AND
+A.DIVISION=S.DIVISION AND A.RECEIVABLE_GROUP=S.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=S.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER4*EXCHANGE_RATE ) AS PER4_MFS
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MFS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS T ON A.CLIENT_NUMBER=T.CLIENT_NUMBER AND
+A.DIVISION=T.DIVISION AND A.RECEIVABLE_GROUP=T.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=T.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER4*EXCHANGE_RATE ) AS PER4_MIS
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MIS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS U ON A.CLIENT_NUMBER=U.CLIENT_NUMBER AND
+A.DIVISION=U.DIVISION AND A.RECEIVABLE_GROUP=U.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=U.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER5*EXCHANGE_RATE ) AS PER5_MCL
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MCL" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS V ON A.CLIENT_NUMBER=V.CLIENT_NUMBER AND
+A.DIVISION=V.DIVISION AND A.RECEIVABLE_GROUP=V.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=V.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER5*EXCHANGE_RATE ) AS PER5_MFS
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MFS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS X ON A.CLIENT_NUMBER=X.CLIENT_NUMBER AND
+A.DIVISION=X.DIVISION AND A.RECEIVABLE_GROUP=X.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=X.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER5*EXCHANGE_RATE ) AS PER5_MIS
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MIS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS Z ON A.CLIENT_NUMBER=Z.CLIENT_NUMBER AND
+A.DIVISION=Z.DIVISION AND A.RECEIVABLE_GROUP=Z.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=Z.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER6*EXCHANGE_RATE ) AS PER6_MCL
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MCL" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS Q ON A.CLIENT_NUMBER=Q.CLIENT_NUMBER AND
+A.DIVISION=Q.DIVISION AND A.RECEIVABLE_GROUP=Q.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=Q.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER6*EXCHANGE_RATE ) AS PER6_MFS
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MFS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS Y ON A.CLIENT_NUMBER=Y.CLIENT_NUMBER AND
+A.DIVISION=Y.DIVISION AND A.RECEIVABLE_GROUP=Y.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=Y.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER6*EXCHANGE_RATE ) AS PER6_MIS
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MIS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS W ON A.CLIENT_NUMBER=W.CLIENT_NUMBER AND
+A.DIVISION=W.DIVISION AND A.RECEIVABLE_GROUP=W.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=W.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER7*EXCHANGE_RATE ) AS PER7_MCL
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MCL" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS A1 ON A.CLIENT_NUMBER=A1.CLIENT_NUMBER AND
+A.DIVISION=A1.DIVISION AND A.RECEIVABLE_GROUP=A1.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=A1.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER7*EXCHANGE_RATE ) AS PER7_MFS
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MFS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS B1 ON A.CLIENT_NUMBER=B1.CLIENT_NUMBER AND
+A.DIVISION=B1.DIVISION AND A.RECEIVABLE_GROUP=B1.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=B1.CREDIT_LIMIT
+LEFT JOIN
+(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER7*EXCHANGE_RATE ) AS PER7_MIS
+FROM `t2`
+WHERE REF IS NULL AND DIVISION="MIS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS C1 ON A.CLIENT_NUMBER=C1.CLIENT_NUMBER AND
+A.DIVISION=C1.DIVISION AND A.RECEIVABLE_GROUP=C1.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=C1.CREDIT_LIMIT
+ORDER BY TOTAL DESC;
+
+DROP TABLES t1,t2;
+
set optimizer_switch=@save_derived_optimizer_switch;
diff --git a/mysql-test/t/events_bugs.test b/mysql-test/t/events_bugs.test
index dc31556998a..5b5123ad295 100644
--- a/mysql-test/t/events_bugs.test
+++ b/mysql-test/t/events_bugs.test
@@ -305,7 +305,7 @@ create table events_smode_test(ev_name char(10), a date);
delimiter |;
create event ee_16407_2 on schedule every 60 second do
begin
- select get_lock('ee_16407_2', 60) /*ee_16407_2*/;
+ select get_lock('ee_16407_2', 60); /*ee_16407_2*/
select release_lock('ee_16407_2');
insert into events_test.events_smode_test values('ee_16407_2','1980-19-02');
end|
@@ -314,7 +314,7 @@ insert into events_test.events_smode_test values ('test','1980-19-02')|
--echo "This is ok"
create event ee_16407_3 on schedule every 60 second do
begin
- select get_lock('ee_16407_2', 60) /*ee_16407_3*/;
+ select get_lock('ee_16407_2', 60); /*ee_16407_3*/
select release_lock('ee_16407_2');
insert into events_test.events_smode_test values ('ee_16407_3','1980-02-19');
insert into events_test.events_smode_test values ('ee_16407_3','1980-02-29');
@@ -323,7 +323,7 @@ set sql_mode=""|
--echo "This will insert rows but they will be truncated"
create event ee_16407_4 on schedule every 60 second do
begin
- select get_lock('ee_16407_2', 60) /*ee_16407_4*/;
+ select get_lock('ee_16407_2', 60); /*ee_16407_4*/
select release_lock('ee_16407_2');
insert into events_test.events_smode_test values ('ee_16407_4','10-11-1956');
end|
@@ -411,13 +411,13 @@ create procedure ee_16407_5_pendant() begin insert into events_test.events_smode
create procedure ee_16407_6_pendant() begin insert into events_test.events_smode_test values('ee_16407_6','2004-02-29'); end|
create event ee_16407_5 on schedule every 60 second do
begin
- select get_lock('ee_16407_5', 60) /*ee_16407_5*/;
+ select get_lock('ee_16407_5', 60); /*ee_16407_5*/
select release_lock('ee_16407_5');
call events_test.ee_16407_5_pendant();
end|
create event ee_16407_6 on schedule every 60 second do
begin
- select get_lock('ee_16407_5', 60) /*ee_16407_6*/;
+ select get_lock('ee_16407_5', 60); /*ee_16407_6*/
select release_lock('ee_16407_5');
call events_test.ee_16407_6_pendant();
end|
diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test
index 3fb87e91b17..f2c53bd5ece 100644
--- a/mysql-test/t/func_time.test
+++ b/mysql-test/t/func_time.test
@@ -1041,6 +1041,24 @@ insert into t1 values ('00:00:00'),('00:01:00');
select 1 from t1 where 1 < some (select cast(a as datetime) from t1);
drop table t1;
+--echo #
+--echo # Bug #21564557: INCONSISTENT OUTPUT FROM 5.5 AND 5.6
+--echo # UNIX_TIMESTAMP(STR_TO_DATE('201506', "%Y%M"
+--echo #
+
+SELECT UNIX_TIMESTAMP(STR_TO_DATE('201506', "%Y%m"));
+SELECT UNIX_TIMESTAMP('2015-06-00');
+SELECT UNIX_TIMESTAMP(STR_TO_DATE('0000-00-00 10:30:30', '%Y-%m-%d %h:%i:%s'));
+
+set sql_mode= 'TRADITIONAL';
+SELECT @@sql_mode;
+
+SELECT UNIX_TIMESTAMP(STR_TO_DATE('201506', "%Y%m"));
+SELECT UNIX_TIMESTAMP('2015-06-00');
+SELECT UNIX_TIMESTAMP(STR_TO_DATE('0000-00-00 10:30:30', '%Y-%m-%d %h:%i:%s'));
+
+set sql_mode= default;
+
select time('10:10:10') > 10;
select time('10:10:10') > 1010;
select time('10:10:09') > 101010;
diff --git a/mysql-test/t/merge_innodb.test b/mysql-test/t/merge_innodb.test
index 7f0b1a0c36e..9f87f241d00 100644
--- a/mysql-test/t/merge_innodb.test
+++ b/mysql-test/t/merge_innodb.test
@@ -39,3 +39,34 @@ SELECT * FROM t2;
SELECT * FROM t1;
DROP TABLE t1, t2, t3, t4, t5;
+#
+# Bug#20691429 temporary merge over view under lock tables
+#
+create table t1 (c1 varchar(100));
+create table t2 (c1 varchar(100));
+create view t3 as select * from t1;
+insert into t1 values ('ann'), ('alice');
+insert into t2 values ('bob'), ('brian');
+create temporary table t4 (c1 varchar(100)) engine=MERGE union=(t2, t1);
+create temporary table t5 (c1 varchar(100)) engine=MERGE union=(t3, t1);
+--error ER_WRONG_MRG_TABLE
+select * from t5;
+lock tables t1 read, t2 read, t3 read, t4 read;
+--error ER_WRONG_MRG_TABLE
+select * from t5;
+select * from t4;
+unlock tables;
+drop table t2;
+create view t2 as select * from t1;
+--error ER_WRONG_MRG_TABLE
+select * from t4;
+lock tables t1 read, t2 read, t3 read;
+--error ER_WRONG_MRG_TABLE
+select * from t4;
+--error ER_WRONG_MRG_TABLE
+select * from t4;
+--error ER_WRONG_MRG_TABLE
+select * from t4;
+unlock tables;
+drop view t2, t3;
+drop table t1;
diff --git a/mysql-test/t/mysql_upgrade_view.test b/mysql-test/t/mysql_upgrade_view.test
index 7a098aa701b..c98c88f840e 100644
--- a/mysql-test/t/mysql_upgrade_view.test
+++ b/mysql-test/t/mysql_upgrade_view.test
@@ -157,5 +157,30 @@ rename table mysql.ev_bk to mysql.event;
drop table if exists kv;
drop view v1,v2,v3,v4;
-drop table t1;
+#
+# MDEV-9453 mysql_upgrade.exe error when mysql is migrated to mariadb
+# (mysql_upgrade.exe --upgrade-system-tables fails on fixing views)
+#
+
+# Make it look like a MySQL directory again
+
+rename table mysql.event to mysql.ev_bk;
+--copy_file $MYSQL_TEST_DIR/std_data/mysql_upgrade/event.MYI $MYSQLD_DATADIR/mysql/event.MYI
+--copy_file $MYSQL_TEST_DIR/std_data/mysql_upgrade/event.MYD $MYSQLD_DATADIR/mysql/event.MYD
+--copy_file $MYSQL_TEST_DIR/std_data/mysql_upgrade/event.frm $MYSQLD_DATADIR/mysql/event.frm
+
+--copy_file $MYSQL_TEST_DIR/std_data/mysql_upgrade/v1.frm $MYSQLD_DATADIR/test/v1.frm
+--copy_file $MYSQL_TEST_DIR/std_data/mysql_upgrade/v2.frm $MYSQLD_DATADIR/test/v2.frm
+--copy_file $MYSQL_TEST_DIR/std_data/mysql_upgrade/v3.frm $MYSQLD_DATADIR/test/v3.frm
+
+flush tables;
+
+--replace_result $MYSQLTEST_VARDIR var
+--exec $MYSQL_UPGRADE --force --upgrade-system-tables 2>&1
+
+# back to mariadb default
+drop table mysql.event;
+rename table mysql.ev_bk to mysql.event;
+drop view v1,v2,v3;
+drop table t1;
diff --git a/mysql-test/t/mysqlcheck.test b/mysql-test/t/mysqlcheck.test
index 6cd0265f89a..88f0d034bf0 100644
--- a/mysql-test/t/mysqlcheck.test
+++ b/mysql-test/t/mysqlcheck.test
@@ -319,9 +319,9 @@ CREATE TABLE test.`t.1` (id int);
drop table test.`t.1`;
-#
-# MDEV-8123 mysqlcheck: new --process-views option conflicts with --quick, --extended and such
-#
+--echo #
+--echo # MDEV-8123 mysqlcheck: new --process-views option conflicts with --quick, --extended and such
+--echo #
create view v1 as select 1;
--echo mysqlcheck --process-views test
--exec $MYSQL_CHECK --process-views test
@@ -340,12 +340,22 @@ create view v1 as select 1;
drop view v1;
-#
-# MDEV-8124 mysqlcheck: --auto-repair runs REPAIR TABLE instead of REPAIR VIEW on views
-#
+--echo #
+--echo # MDEV-8124 mysqlcheck: --auto-repair runs REPAIR TABLE instead of REPAIR VIEW on views
+--echo #
create table t1(a int);
--copy_file $MYSQL_TEST_DIR/std_data/mysql_upgrade/v1.frm $MYSQLD_DATADIR/test/v1.frm
--echo mysqlcheck --process-views --check-upgrade --auto-repair test
--exec $MYSQL_CHECK --process-views --check-upgrade --auto-repair test
drop view v1;
drop table t1;
+
+--echo #
+--echo #MDEV-7384 [PATCH] add PERSISENT FOR ALL option to mysqlanalyze/mysqlcheck
+--echo #
+create table t1(a int);
+insert into t1 (a) values (1), (2), (3);
+select * from mysql.column_stats;
+--exec $MYSQL_CHECK --analyze test t1 --persistent
+select * from mysql.column_stats where db_name = 'test' and table_name = 't1';
+drop table t1;
diff --git a/mysql-test/t/mysqld--help.test b/mysql-test/t/mysqld--help.test
index 0f46300a440..3d29cbc6cce 100644
--- a/mysql-test/t/mysqld--help.test
+++ b/mysql-test/t/mysqld--help.test
@@ -30,7 +30,7 @@ perl;
thread-concurrency super-large-pages mutex-deadlock-detector
connect null-audit aria oqgraph sphinx thread-handling
test-sql-discovery rpl-semi-sync query-cache-info
- query-response-time metadata-lock-info locales/;
+ query-response-time metadata-lock-info locales unix-socket/;
# And substitute the content some environment variables with their
# names:
diff --git a/mysql-test/t/partition_pruning.test b/mysql-test/t/partition_pruning.test
index 06ef99e1e70..9d72e9c0d01 100644
--- a/mysql-test/t/partition_pruning.test
+++ b/mysql-test/t/partition_pruning.test
@@ -1517,3 +1517,22 @@ and dept_id in (select dept_id from t2 where COMPANY_ID = 1000);
drop table t1,t2;
+--echo #
+--echo # MDEV-9505: Valgrind failure in SEL_ARG::store_min,find_used_partitions,...
+--echo #
+create table t1 (a int, b char(10), c varchar(5), d int)
+partition by range columns(a,b,c)
+subpartition by key (c,d)
+subpartitions 3
+( partition p0 values less than (1,'abc','abc'),
+ partition p1 values less than (2,'abc','abc'),
+ partition p2 values less than (3,'abc','abc'),
+ partition p3 values less than (4,'abc','abc')
+);
+
+insert into t1 values (1,'a','b',1),(2,'a','b',2),(3,'a','b',3);
+select * from t1 where (a = 1 AND b < 'd' AND (c = 'b' OR (c = 'c' AND d = 1)) OR
+ (a = 1 AND b >= 'a' AND (c = 'c' OR (c = 'd' AND d = 2))));
+drop table t1;
+
+
diff --git a/mysql-test/t/second_frac-9175.test b/mysql-test/t/second_frac-9175.test
new file mode 100644
index 00000000000..91baf997459
--- /dev/null
+++ b/mysql-test/t/second_frac-9175.test
@@ -0,0 +1,9 @@
+#
+# MDEV-9175 Query parser tansforms MICROSECOND into SECOND_FRAC, which does not work
+#
+
+select timestampdiff(microsecond,'2000-01-01 00:00:00','2001-01-01 00:00:00.123456');
+explain extended select timestampdiff(microsecond,'2000-01-01 00:00:00','2001-01-01 00:00:00.123456');
+create view v1 as select timestampdiff(microsecond,'2000-01-01 00:00:00','2001-01-01 00:00:00.123456');
+select * from v1;
+drop view v1;
diff --git a/mysql-test/t/select_found.test b/mysql-test/t/select_found.test
index 88940eaf2b8..33613697722 100644
--- a/mysql-test/t/select_found.test
+++ b/mysql-test/t/select_found.test
@@ -277,3 +277,13 @@ select sql_calc_found_rows * from t1 ignore index (i) where i = 0 order by v lim
select found_rows();
drop table t1;
+#
+# MDEV-9390 Function found_rows() gives incorrect result where the previous SELECT contains ORDER BY clause
+#
+create table t1(c1 int);
+insert into t1 values(1),(2),(3),(4),(5);
+select * from t1 order by c1 limit 2,1;
+select found_rows();
+select sql_calc_found_rows * from t1 order by c1 limit 2,1;
+select found_rows();
+drop table t1;
diff --git a/mysql-test/t/ssl_cert_verify.test b/mysql-test/t/ssl_cert_verify.test
new file mode 100644
index 00000000000..83f621b7ca9
--- /dev/null
+++ b/mysql-test/t/ssl_cert_verify.test
@@ -0,0 +1,43 @@
+# Want to skip this test from Valgrind execution
+--source include/no_valgrind_without_big.inc
+# This test should work in embedded server after we fix mysqltest
+-- source include/not_embedded.inc
+-- source include/have_ssl_communication.inc
+# Save the initial number of concurrent sessions
+--source include/count_sessions.inc
+
+let $ssl_verify_fail_path = --ssl --ssl-ca=$MYSQL_TEST_DIR/std_data/ca-cert-verify.pem --ssl-key=$MYSQL_TEST_DIR/std_data/server-key-verify-fail.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/server-cert-verify-fail.pem;
+let $ssl_verify_pass_path = --ssl --ssl-ca=$MYSQL_TEST_DIR/std_data/ca-cert-verify.pem --ssl-key=$MYSQL_TEST_DIR/std_data/server-key-verify-pass.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/server-cert-verify-pass.pem;
+
+--echo #T1: Host name (/CN=localhost/) as OU name in the server certificate, server certificate verification should fail.
+--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--shutdown_server
+--source include/wait_until_disconnected.inc
+
+--exec echo "restart:" $ssl_verify_fail_path > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--enable_reconnect
+--source include/wait_until_connected_again.inc
+
+--error 1
+--exec $MYSQL --protocol=tcp --ssl-ca=$MYSQL_TEST_DIR/std_data/ca-cert-verify.pem --ssl-verify-server-cert -e "SHOW STATUS like 'Ssl_version'"
+
+--echo #T2: Host name (localhost) as common name in the server certificate, server certificate verification should pass.
+--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--shutdown_server
+--source include/wait_until_disconnected.inc
+
+--exec echo "restart:" $ssl_verify_pass_path > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--enable_reconnect
+--source include/wait_until_connected_again.inc
+
+--replace_result TLSv1.2 TLS_VERSION TLSv1.1 TLS_VERSION TLSv1 TLS_VERSION
+--exec $MYSQL --protocol=tcp --ssl-ca=$MYSQL_TEST_DIR/std_data/ca-cert-verify.pem --ssl-verify-server-cert -e "SHOW STATUS like 'Ssl_version'"
+
+--echo # restart server using restart
+--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--shutdown_server
+--source include/wait_until_disconnected.inc
+
+--exec echo "restart: " > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--enable_reconnect
+--source include/wait_until_connected_again.inc
diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test
index d6a7300b03a..45c4fe920b7 100644
--- a/mysql-test/t/subselect.test
+++ b/mysql-test/t/subselect.test
@@ -5966,6 +5966,17 @@ deallocate prepare stmt;
drop table t1,t2,t3,t4;
--echo #
+--echo # MDEV-7122
+--echo # Assertion `0' failed in subselect_hash_sj_engine::init
+--echo #
+SET SESSION big_tables=1;
+CREATE TABLE t1(a char(255) DEFAULT '', KEY(a(10))) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
+INSERT INTO t1 VALUES(0),(0),(0);
+SELECT * FROM t1 WHERE a IN(SELECT MIN(a) FROM t1);
+DROP TABLE t1;
+SET SESSION big_tables=0;
+
+--echo #
--echo # MDEV-7930: Assertion `table_share->tmp_table != NO_TMP_TABLE ||
--echo # m_lock_type != 2' failed in handler::ha_index_read_map
--echo #
diff --git a/mysql-test/t/subselect_sj.test b/mysql-test/t/subselect_sj.test
index c989cb22558..b26d5a71e46 100644
--- a/mysql-test/t/subselect_sj.test
+++ b/mysql-test/t/subselect_sj.test
@@ -2704,5 +2704,74 @@ explain
select 1 from t1 where _cp932 "1" in (select '1' from t1);
drop table t1;
+--echo #
+--echo # MDEV-7823: Server crashes in next_depth_first_tab on nested IN clauses with SQ inside
+--echo #
+set @tmp_mdev7823=@@optimizer_switch;
+set optimizer_switch=default;
+CREATE TABLE t1 (f1 INT);
+INSERT INTO t1 VALUES (1);
+
+CREATE TABLE t2 (f2 INT, KEY(f2));
+INSERT INTO t2 VALUES (8),(0);
+
+CREATE TABLE t3 (f3 INT);
+INSERT INTO t3 VALUES (1),(2);
+
+CREATE TABLE t4 (f4 INT);
+INSERT INTO t4 VALUES (0),(5);
+
+explain
+SELECT * FROM t1, t2, t3 WHERE f2 IN ( f1 IN ( SELECT f4 FROM t4 ) );
+SELECT * FROM t1, t2, t3 WHERE f2 IN ( f1 IN ( SELECT f4 FROM t4 ) );
+
+drop table t1,t2,t3,t4;
+set optimizer_switch= @tmp_mdev7823;
+
+--echo #
+--echo # MDEV-6859: scalar subqueries in a comparison produced unexpected result
+--echo #
+set @tmp_mdev6859=@@optimizer_switch;
+set optimizer_switch=default;
+CREATE TABLE t1 (
+ project_number varchar(50) NOT NULL,
+ PRIMARY KEY (project_number)
+) ENGINE=MyISAM;
+
+INSERT INTO t1 (project_number) VALUES ('aaa'),('bbb');
+
+CREATE TABLE t2 (
+ id int(10) unsigned NOT NULL AUTO_INCREMENT,
+ project_number varchar(50) NOT NULL,
+ history_date date NOT NULL,
+ country varchar(50) NOT NULL,
+ PRIMARY KEY (id)
+) ENGINE=MyISAM;
+
+INSERT INTO t2 (id, project_number, history_date, country) VALUES
+(1, 'aaa', '2014-08-09', 'france'),(2, 'aaa', '2014-09-09', 'singapore');
+
+CREATE TABLE t3 (
+ region varchar(50) NOT NULL,
+ country varchar(50) NOT NULL
+) ENGINE=MyISAM;
+
+INSERT INTO t3 (region, country) VALUES ('apac', 'singapore'),('eame', 'france');
+
+SELECT SQL_NO_CACHE a.project_number
+FROM t1 a
+WHERE ( SELECT z.country
+ FROM t2 z
+ WHERE z.project_number = a.project_number AND z.history_date <= '2014-09-01'
+ ORDER BY z.id DESC LIMIT 1
+ ) IN (
+ SELECT r.country
+ FROM t3 r
+ WHERE r.region = 'eame'
+ );
+
+drop table t1, t2, t3;
+set optimizer_switch= @tmp_mdev6859;
+
# The following command must be the last one the file
set optimizer_switch=@subselect_sj_tmp;
diff --git a/mysql-test/t/type_blob.test b/mysql-test/t/type_blob.test
index 04b074b5cc5..a20173e231a 100644
--- a/mysql-test/t/type_blob.test
+++ b/mysql-test/t/type_blob.test
@@ -643,6 +643,10 @@ DROP TABLE t1;
--echo End of 5.1 tests
+--echo #
+--echo # Start of 5.5 tests
+--echo #
+
#
# Problem when comparing blobs #778901
#
@@ -651,3 +655,24 @@ CREATE TABLE t1 ( f1 blob, f2 blob );
INSERT INTO t1 VALUES ('','');
SELECT f1,f2,"found row" FROM t1 WHERE f1 = f2 ;
DROP TABLE t1;
+
+--echo #
+--echo # MDEV-9319 ALTER from a bigger to a smaller blob type truncates too much data
+--echo #
+CREATE TABLE t1 (a MEDIUMBLOB);
+INSERT INTO t1 VALUES (REPEAT(0x61,128000));
+SELECT LENGTH(a) FROM t1;
+ALTER TABLE t1 MODIFY a BLOB;
+SELECT LENGTH(a) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a BLOB);
+INSERT INTO t1 VALUES (REPEAT(0x61,65000));
+SELECT LENGTH(a) FROM t1;
+ALTER TABLE t1 MODIFY a TINYBLOB;
+SELECT LENGTH(a) FROM t1;
+DROP TABLE t1;
+
+--echo #
+--echo # End of 5.5 tests
+--echo #
diff --git a/mysql-test/t/type_date.test b/mysql-test/t/type_date.test
index 6b8ed128f4b..c01adc1b233 100644
--- a/mysql-test/t/type_date.test
+++ b/mysql-test/t/type_date.test
@@ -385,3 +385,10 @@ select 1 from t1 as t1_0 inner join t1 as t2 on (t1_0.a <=> now()) join t1 on 1;
select 1 from t1 as t1_0 inner join t1 as t2 on (t1_0.a <=> now()) join t1 on 1;
drop table t1;
+--echo #
+--echo # MDEV-9511 Valgrind warnings 'Invalid read' in Field_newdate::cmp and Field_newdate::val_str
+--echo #
+CREATE TABLE t1 (f1 DATE, f2 VARCHAR(1));
+INSERT INTO t1 VALUES ('2003-04-27','a'),('1900-01-01','a');
+SELECT GROUP_CONCAT(f2, IF(f1, f2, f1), f1 ORDER BY 2,1,3) FROM t1;
+DROP TABLE t1;
diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test
index d8e7ad051d7..b962903d0dc 100644
--- a/mysql-test/t/view.test
+++ b/mysql-test/t/view.test
@@ -5480,6 +5480,16 @@ deallocate prepare stmt;
drop view v1,v2;
drop table `t1`;
+
+#
+# Bug#19817021
+#
+create table t1 (a int, b int);
+create view v1 as select a+b from t1;
+alter table v1 check partition p1;
+drop view v1;
+drop table t1;
+
--echo # -----------------------------------------------------------------
--echo # -- End of 5.5 tests.
--echo # -----------------------------------------------------------------
diff --git a/mysql-test/valgrind.supp b/mysql-test/valgrind.supp
index b0c6533df0b..c87be27233d 100644
--- a/mysql-test/valgrind.supp
+++ b/mysql-test/valgrind.supp
@@ -1,5 +1,5 @@
-# Copyright (c) 2005, 2011, Oracle and/or its affiliates.
-# Copyright (c) 2008-2011, Monty Program Ab
+# Copyright (c) 2005, 2015, Oracle and/or its affiliates.
+# Copyright (c) 2008, 2016, MariaDB
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
@@ -1097,8 +1097,8 @@
# write_keys() and find_all_keys().
# They both return ha_rows, which is platform dependent.
#
-# The '...' wildcards are for 'fun:inline_mysql_file_write' which *may*
-# be inlined.
+# The '...' wildcards are for 'fun:inline_mysql_file_write' and
+# 'fun:find_all_keys' which *may* be inlined.
{
Bug#12856915 VALGRIND FAILURE IN FILESORT/CREATE_SORT_INDEX / one
Memcheck:Param
@@ -1109,7 +1109,7 @@
fun:my_b_flush_io_cache
fun:_my_b_write
fun:_Z*10write_keysP13st_sort_paramPPhjP11st_io_cacheS4_
- fun:_Z*13find_all_keysP13st_sort_paramP10SQL_SELECTPPhP11st_io_cacheS6_
+ ...
fun:_Z8filesortP3THDP5TABLEP13st_sort_fieldjP10SQL_SELECTybPy
}
diff --git a/mysys/file_logger.c b/mysys/file_logger.c
index 394b59f6378..b94cb705d3f 100644
--- a/mysys/file_logger.c
+++ b/mysys/file_logger.c
@@ -14,11 +14,13 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+#ifndef FLOGGER_SKIP_INCLUDES
#include "my_global.h"
#include <my_sys.h>
#include <m_string.h>
#include <mysql/service_logger.h>
#include <my_pthread.h>
+#endif /*FLOGGER_SKIP_INCLUDES*/
#ifndef flogger_mutex_init
#define flogger_mutex_init(A,B,C) mysql_mutex_init(A,B,C)
diff --git a/mysys/lf_hash.c b/mysys/lf_hash.c
index eb0c252edb1..0699f5d49fe 100644
--- a/mysys/lf_hash.c
+++ b/mysys/lf_hash.c
@@ -1,4 +1,5 @@
-/* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2006, 2010, Oracle and/or its affiliates.
+ Copyright (c) 2009, 2016, MariaDB
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
diff --git a/mysys/my_default.c b/mysys/my_default.c
index f79117c7259..c7ab8763e1f 100644
--- a/mysys/my_default.c
+++ b/mysys/my_default.c
@@ -596,6 +596,7 @@ int my_load_defaults(const char *conf_file, const char **groups,
handle_default_option, (void *) &ctx,
dirs)))
{
+ delete_dynamic(&args);
free_root(&alloc,MYF(0));
DBUG_RETURN(error);
}
diff --git a/mysys/my_gethwaddr.c b/mysys/my_gethwaddr.c
index 208f2ff902a..0fad7f90552 100644
--- a/mysys/my_gethwaddr.c
+++ b/mysys/my_gethwaddr.c
@@ -72,7 +72,7 @@ err:
return res;
}
-#elif defined(__linux__) || defined(__sun__)
+#elif defined(__linux__) || defined(__sun)
#include <net/if.h>
#include <sys/ioctl.h>
#include <net/if_arp.h>
diff --git a/mysys/my_rnd.c b/mysys/my_rnd.c
index 14f212e2f32..ad7bda0b42b 100644
--- a/mysys/my_rnd.c
+++ b/mysys/my_rnd.c
@@ -95,7 +95,3 @@ double my_rnd_ssl(struct my_rnd_struct *rand_st)
return my_rnd(rand_st);
}
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/mysys/my_wincond.c b/mysys/my_wincond.c
index c761064dd96..07ba4f5c587 100644
--- a/mysys/my_wincond.c
+++ b/mysys/my_wincond.c
@@ -1,4 +1,5 @@
-/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 2014, Oracle and/or its affiliates.
+ Copyright (c) 2011, 2016, MariaDB
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
diff --git a/mysys/string.c b/mysys/string.c
index cc73d18c601..a0fa3a02e17 100644
--- a/mysys/string.c
+++ b/mysys/string.c
@@ -142,16 +142,16 @@ my_bool dynstr_trunc(DYNAMIC_STRING *str, size_t n)
my_bool dynstr_append_os_quoted(DYNAMIC_STRING *str, const char *append, ...)
{
#ifdef __WIN__
- const char *quote_str= "\"";
- const uint quote_len= 1;
+ LEX_CSTRING quote= { C_STRING_WITH_LEN("\"") };
+ LEX_CSTRING replace= { C_STRING_WITH_LEN("\\\"") };
#else
- const char *quote_str= "\'";
- const uint quote_len= 1;
+ LEX_CSTRING quote= { C_STRING_WITH_LEN("\'") };
+ LEX_CSTRING replace= { C_STRING_WITH_LEN("'\"'\"'") };
#endif /* __WIN__ */
my_bool ret= TRUE;
va_list dirty_text;
- ret&= dynstr_append_mem(str, quote_str, quote_len); /* Leading quote */
+ ret&= dynstr_append_mem(str, quote.str, quote.length); /* Leading quote */
va_start(dirty_text, append);
while (append != NullS)
{
@@ -159,18 +159,17 @@ my_bool dynstr_append_os_quoted(DYNAMIC_STRING *str, const char *append, ...)
const char *next_pos= cur_pos;
/* Search for quote in each string and replace with escaped quote */
- while(*(next_pos= strcend(cur_pos, quote_str[0])) != '\0')
+ while(*(next_pos= strcend(cur_pos, quote.str[0])) != '\0')
{
ret&= dynstr_append_mem(str, cur_pos, (uint) (next_pos - cur_pos));
- ret&= dynstr_append_mem(str ,"\\", 1);
- ret&= dynstr_append_mem(str, quote_str, quote_len);
+ ret&= dynstr_append_mem(str, replace.str, replace.length);
cur_pos= next_pos + 1;
}
ret&= dynstr_append_mem(str, cur_pos, (uint) (next_pos - cur_pos));
append= va_arg(dirty_text, char *);
}
va_end(dirty_text);
- ret&= dynstr_append_mem(str, quote_str, quote_len); /* Trailing quote */
+ ret&= dynstr_append_mem(str, quote.str, quote.length); /* Trailing quote */
return ret;
}
diff --git a/mysys_ssl/my_aes.cc b/mysys_ssl/my_aes.cc
index 05dbfdb4f0b..2bc54d68848 100644
--- a/mysys_ssl/my_aes.cc
+++ b/mysys_ssl/my_aes.cc
@@ -26,6 +26,10 @@
#include <openssl/evp.h>
#include <openssl/err.h>
+#ifdef HAVE_ERR_remove_thread_state
+#define ERR_remove_state(X) ERR_remove_thread_state(NULL)
+#endif
+
// Wrap C struct, to ensure resources are released.
struct MyCipherCtx
{
diff --git a/plugin/auth_socket/CMakeLists.txt b/plugin/auth_socket/CMakeLists.txt
index 8137c6b4529..e4a8d1d6efd 100644
--- a/plugin/auth_socket/CMakeLists.txt
+++ b/plugin/auth_socket/CMakeLists.txt
@@ -65,6 +65,6 @@ ENDIF()
ENDIF()
IF(ok)
- MYSQL_ADD_PLUGIN(auth_socket auth_socket.c MODULE_ONLY)
+ MYSQL_ADD_PLUGIN(auth_socket auth_socket.c)
ENDIF()
diff --git a/plugin/auth_socket/auth_socket.c b/plugin/auth_socket/auth_socket.c
index 601b76b6b5c..f04b1d9d2a1 100644
--- a/plugin/auth_socket/auth_socket.c
+++ b/plugin/auth_socket/auth_socket.c
@@ -105,7 +105,7 @@ static struct st_mysql_auth socket_auth_handler=
socket_auth
};
-maria_declare_plugin(socket_auth)
+maria_declare_plugin(auth_socket)
{
MYSQL_AUTHENTICATION_PLUGIN,
&socket_auth_handler,
diff --git a/plugin/feedback/feedback.cc b/plugin/feedback/feedback.cc
index de7b2c9060b..b9ab3563125 100644
--- a/plugin/feedback/feedback.cc
+++ b/plugin/feedback/feedback.cc
@@ -29,7 +29,7 @@ ulong debug_startup_interval, debug_first_interval, debug_interval;
char server_uid_buf[SERVER_UID_SIZE+1]; ///< server uid will be written here
/* backing store for system variables */
-static char *server_uid= server_uid_buf, *url;
+static char *server_uid= server_uid_buf, *url, *http_proxy;
char *user_info;
ulong send_timeout, send_retry_wait;
@@ -285,7 +285,13 @@ static int init(void *p)
if (*e == 0 || *e == ' ')
{
if (e > s && (urls[slot]= Url::create(s, e - s)))
+ {
+ if (urls[slot]->set_proxy(http_proxy,
+ http_proxy ? strlen(http_proxy) : 0))
+ sql_print_error("feedback plugin: invalid proxy '%s'",
+ http_proxy ? http_proxy : "");
slot++;
+ }
else
{
if (e > s)
@@ -363,6 +369,9 @@ static MYSQL_SYSVAR_ULONG(send_timeout, send_timeout, PLUGIN_VAR_RQCMDARG,
static MYSQL_SYSVAR_ULONG(send_retry_wait, send_retry_wait, PLUGIN_VAR_RQCMDARG,
"Wait this many seconds before retrying a failed send.",
NULL, NULL, 60, 1, 60*60*24, 1);
+static MYSQL_SYSVAR_STR(http_proxy, http_proxy,
+ PLUGIN_VAR_READONLY | PLUGIN_VAR_RQCMDARG,
+ "Proxy server host:port.", NULL, NULL,0);
#ifndef DBUG_OFF
static MYSQL_SYSVAR_ULONG(debug_startup_interval, debug_startup_interval,
@@ -382,6 +391,7 @@ static struct st_mysql_sys_var* settings[] = {
MYSQL_SYSVAR(url),
MYSQL_SYSVAR(send_timeout),
MYSQL_SYSVAR(send_retry_wait),
+ MYSQL_SYSVAR(http_proxy),
#ifndef DBUG_OFF
MYSQL_SYSVAR(debug_startup_interval),
MYSQL_SYSVAR(debug_first_interval),
diff --git a/plugin/feedback/feedback.h b/plugin/feedback/feedback.h
index 2cfbeed4eb5..bb3f896288d 100644
--- a/plugin/feedback/feedback.h
+++ b/plugin/feedback/feedback.h
@@ -52,8 +52,14 @@ class Url {
const char *url() { return full_url.str; }
size_t url_length() { return full_url.length; }
virtual int send(const char* data, size_t data_length) = 0;
+ virtual int set_proxy(const char *proxy, size_t proxy_len)
+ {
+ return 0;
+ }
static Url* create(const char *url, size_t url_length);
+ static int parse_proxy_server(const char *proxy_server, size_t proxy_length,
+ LEX_STRING *host, LEX_STRING *port);
};
extern Url **urls;
diff --git a/plugin/feedback/url_base.cc b/plugin/feedback/url_base.cc
index e7d038f02e2..6afbcd7c8f4 100644
--- a/plugin/feedback/url_base.cc
+++ b/plugin/feedback/url_base.cc
@@ -48,4 +48,49 @@ Url* Url::create(const char *url, size_t url_length)
return self;
}
+int Url::parse_proxy_server(const char *proxy_server, size_t proxy_length,
+ LEX_STRING *host, LEX_STRING *port)
+{
+ const char *s;
+
+ host->length= 0;
+ if (proxy_server == NULL)
+ return 0;
+
+ for (; proxy_length > 0 && my_isspace(system_charset_info, *proxy_server);
+ proxy_server++, proxy_length--) /* no-op */;
+
+ if (proxy_length == 0)
+ return 0;
+
+ for (s=proxy_server; *s && *s != ':'; s++) /* no-op */;
+
+ host->str= const_cast<char*>(proxy_server);
+ if ((host->length= s-proxy_server) == 0)
+ return 0;
+
+ port->length= 0;
+
+ if (*s == ':')
+ {
+ s++;
+ port->str= const_cast<char*>(s);
+ while (*s >= '0' && *s <= '9')
+ {
+ s++;
+ port->length++;
+ }
+ }
+
+ if (port->length == 0)
+ {
+ port->str= const_cast<char*>("80");
+ port->length= 2;
+ }
+
+ host->str= my_strndup(host->str, host->length, MYF(MY_WME));
+ port->str= my_strndup(port->str, port->length, MYF(MY_WME));
+ return 0;
+}
+
} // namespace feedback
diff --git a/plugin/feedback/url_http.cc b/plugin/feedback/url_http.cc
index f214f7a6ccc..d04ff6fa9d5 100644
--- a/plugin/feedback/url_http.cc
+++ b/plugin/feedback/url_http.cc
@@ -38,20 +38,39 @@ class Url_http: public Url {
protected:
const LEX_STRING host, port, path;
bool ssl;
+ LEX_STRING proxy_host, proxy_port;
+
+ int use_proxy()
+ {
+ return proxy_host.length;
+ }
Url_http(LEX_STRING &url_arg, LEX_STRING &host_arg,
LEX_STRING &port_arg, LEX_STRING &path_arg, bool ssl_arg) :
Url(url_arg), host(host_arg), port(port_arg), path(path_arg), ssl(ssl_arg)
- {}
+ {
+ proxy_host.length= 0;
+ }
~Url_http()
{
my_free(host.str);
my_free(port.str);
my_free(path.str);
+ set_proxy(0,0);
}
public:
int send(const char* data, size_t data_length);
+ int set_proxy(const char *proxy, size_t proxy_len)
+ {
+ if (use_proxy())
+ {
+ my_free(proxy_host.str);
+ my_free(proxy_port.str);
+ }
+
+ return parse_proxy_server(proxy, proxy_len, &proxy_host, &proxy_port);
+ }
friend Url* http_create(const char *url, size_t url_length);
};
@@ -150,7 +169,9 @@ int Url_http::send(const char* data, size_t data_length)
uint len= 0;
addrinfo *addrs, *addr, filter= {0, AF_UNSPEC, SOCK_STREAM, 6, 0, 0, 0, 0};
- int res= getaddrinfo(host.str, port.str, &filter, &addrs);
+ int res= use_proxy() ?
+ getaddrinfo(proxy_host.str, proxy_port.str, &filter, &addrs) :
+ getaddrinfo(host.str, port.str, &filter, &addrs);
if (res)
{
@@ -228,16 +249,20 @@ int Url_http::send(const char* data, size_t data_length)
};
len= my_snprintf(buf, sizeof(buf),
- "POST %s HTTP/1.0\r\n"
- "User-Agent: MariaDB User Feedback Plugin\r\n"
- "Host: %s:%s\r\n"
- "Accept: */*\r\n"
- "Content-Length: %u\r\n"
- "Content-Type: multipart/form-data; boundary=%s\r\n"
- "\r\n",
- path.str, host.str, port.str,
- (uint)(2*boundary.length + header.length + data_length + 4),
- boundary.str + 2);
+ use_proxy() ? "POST http://%s:%s/" : "POST ",
+ host.str, port.str);
+
+ len+= my_snprintf(buf+len, sizeof(buf)-len,
+ "%s HTTP/1.0\r\n"
+ "User-Agent: MariaDB User Feedback Plugin\r\n"
+ "Host: %s:%s\r\n"
+ "Accept: */*\r\n"
+ "Content-Length: %u\r\n"
+ "Content-Type: multipart/form-data; boundary=%s\r\n"
+ "\r\n",
+ path.str, host.str, port.str,
+ (uint)(2*boundary.length + header.length + data_length + 4),
+ boundary.str + 2);
vio_timeout(vio, FOR_READING, send_timeout);
vio_timeout(vio, FOR_WRITING, send_timeout);
diff --git a/plugin/semisync/semisync_master.cc b/plugin/semisync/semisync_master.cc
index af5eb9d090d..12415484b82 100644
--- a/plugin/semisync/semisync_master.cc
+++ b/plugin/semisync/semisync_master.cc
@@ -1,6 +1,6 @@
/* Copyright (C) 2007 Google Inc.
- Copyright (c) 2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
- Use is subject to license terms.
+ Copyright (c) 2008, 2013, Oracle and/or its affiliates.
+ Copyright (c) 2011, 2016, MariaDB
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
diff --git a/plugin/server_audit/CMakeLists.txt b/plugin/server_audit/CMakeLists.txt
index 527d0d702da..3de8c43c871 100644
--- a/plugin/server_audit/CMakeLists.txt
+++ b/plugin/server_audit/CMakeLists.txt
@@ -13,4 +13,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-MYSQL_ADD_PLUGIN(server_audit server_audit.c MODULE_ONLY)
+SET(SERVER_AUDIT_SOURCES
+ server_audit.c test_audit_v4.c plugin_audit_v4.h)
+
+ MYSQL_ADD_PLUGIN(server_audit ${SERVER_AUDIT_SOURCES} MODULE_ONLY)
diff --git a/plugin/server_audit/plugin_audit_v4.h b/plugin/server_audit/plugin_audit_v4.h
new file mode 100644
index 00000000000..5f8e43b3811
--- /dev/null
+++ b/plugin/server_audit/plugin_audit_v4.h
@@ -0,0 +1,561 @@
+/* Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; version 2 of
+ the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+#ifndef _my_audit_h
+#define _my_audit_h
+
+#ifndef PLUGIN_CONTEXT
+#include "plugin.h"
+#include "mysql/mysql_lex_string.h"
+#ifndef MYSQL_ABI_CHECK
+#include "m_string.h"
+#endif
+#include "my_command.h"
+#include "my_sqlcommand.h"
+#endif /*PLUGIN_CONTEXT*/
+
+#define MYSQL_AUDIT_INTERFACE_VERSION 0x0401
+
+/**
+ @enum mysql_event_class_t
+
+ Audit event classes.
+*/
+typedef enum
+{
+ MYSQL_AUDIT_GENERAL_CLASS = 0,
+ MYSQL_AUDIT_CONNECTION_CLASS = 1,
+ MYSQL_AUDIT_PARSE_CLASS = 2,
+ MYSQL_AUDIT_AUTHORIZATION_CLASS = 3,
+ MYSQL_AUDIT_TABLE_ACCESS_CLASS = 4,
+ MYSQL_AUDIT_GLOBAL_VARIABLE_CLASS = 5,
+ MYSQL_AUDIT_SERVER_STARTUP_CLASS = 6,
+ MYSQL_AUDIT_SERVER_SHUTDOWN_CLASS = 7,
+ MYSQL_AUDIT_COMMAND_CLASS = 8,
+ MYSQL_AUDIT_QUERY_CLASS = 9,
+ MYSQL_AUDIT_STORED_PROGRAM_CLASS = 10,
+ /* This item must be last in the list. */
+ MYSQL_AUDIT_CLASS_MASK_SIZE
+} mysql_event_class_t;
+
+/**
+ @struct st_mysql_audit
+
+ The descriptor structure that is referred from st_mysql_plugin.
+*/
+struct st_mysql_audit
+{
+ /**
+ Interface version.
+ */
+ int interface_version;
+
+ /**
+ Event occurs when the event class consumer is to be
+ disassociated from the specified THD.This would typically occur
+ before some operation which may require sleeping - such as when
+ waiting for the next query from the client.
+ */
+ void (*release_thd)(MYSQL_THD);
+
+ /**
+ Invoked whenever an event occurs which is of any
+ class for which the plugin has interest.The second argument
+ indicates the specific event class and the third argument is data
+ as required for that class.
+ */
+ int (*event_notify)(MYSQL_THD, mysql_event_class_t, const void *);
+
+ /**
+ An array of bits used to indicate what event classes
+ that this plugin wants to receive.
+ */
+ unsigned long class_mask[MYSQL_AUDIT_CLASS_MASK_SIZE];
+};
+
+/**
+ @typedef enum_sql_command_t
+
+ SQL command type definition.
+*/
+typedef enum enum_sql_command enum_sql_command_t;
+
+/**
+ @enum mysql_event_general_subclass_t
+
+ Events for the MYSQL_AUDIT_GENERAL_CLASS event class.
+*/
+typedef enum
+{
+ /** occurs before emitting to the general query log. */
+ MYSQL_AUDIT_GENERAL_LOG = 1 << 0,
+ /** occurs before transmitting errors to the user. */
+ MYSQL_AUDIT_GENERAL_ERROR = 1 << 1,
+ /** occurs after transmitting a resultset to the user. */
+ MYSQL_AUDIT_GENERAL_RESULT = 1 << 2,
+ /** occurs after transmitting a resultset or errors */
+ MYSQL_AUDIT_GENERAL_STATUS = 1 << 3
+} mysql_event_general_subclass_t;
+
+#define MYSQL_AUDIT_GENERAL_ALL (MYSQL_AUDIT_GENERAL_LOG | \
+ MYSQL_AUDIT_GENERAL_ERROR | \
+ MYSQL_AUDIT_GENERAL_RESULT | \
+ MYSQL_AUDIT_GENERAL_STATUS)
+/**
+ @struct mysql_event_general
+
+ Structure for the MYSQL_AUDIT_GENERAL_CLASS event class.
+*/
+struct mysql_event_general
+{
+ mysql_event_general_subclass_t event_subclass;
+ int general_error_code;
+ unsigned long general_thread_id;
+ MYSQL_LEX_CSTRING general_user;
+ MYSQL_LEX_CSTRING general_command;
+ MYSQL_LEX_CSTRING general_query;
+ struct charset_info_st *general_charset;
+ unsigned long long general_time;
+ unsigned long long general_rows;
+ MYSQL_LEX_CSTRING general_host;
+ MYSQL_LEX_CSTRING general_sql_command;
+ MYSQL_LEX_CSTRING general_external_user;
+ MYSQL_LEX_CSTRING general_ip;
+};
+
+/**
+ @enum mysql_event_connection_subclass_t
+
+ Events for MYSQL_AUDIT_CONNECTION_CLASS event class.
+*/
+typedef enum
+{
+ /** occurs after authentication phase is completed. */
+ MYSQL_AUDIT_CONNECTION_CONNECT = 1 << 0,
+ /** occurs after connection is terminated. */
+ MYSQL_AUDIT_CONNECTION_DISCONNECT = 1 << 1,
+ /** occurs after COM_CHANGE_USER RPC is completed. */
+ MYSQL_AUDIT_CONNECTION_CHANGE_USER = 1 << 2,
+ /** occurs before authentication. */
+ MYSQL_AUDIT_CONNECTION_PRE_AUTHENTICATE = 1 << 3
+} mysql_event_connection_subclass_t;
+
+#define MYSQL_AUDIT_CONNECTION_ALL (MYSQL_AUDIT_CONNECTION_CONNECT | \
+ MYSQL_AUDIT_CONNECTION_DISCONNECT | \
+ MYSQL_AUDIT_CONNECTION_CHANGE_USER | \
+ MYSQL_AUDIT_CONNECTION_PRE_AUTHENTICATE)
+/**
+ @struct mysql_event_connection
+
+ Structure for the MYSQL_AUDIT_CONNECTION_CLASS event class.
+*/
+struct mysql_event_connection
+{
+ /** Event subclass. */
+ mysql_event_connection_subclass_t event_subclass;
+ /** Current status of the connection. */
+ int status;
+ /** Connection id. */
+ unsigned long connection_id;
+ /** User name of this connection. */
+ MYSQL_LEX_CSTRING user;
+ /** Priv user name. */
+ MYSQL_LEX_CSTRING priv_user;
+ /** External user name. */
+ MYSQL_LEX_CSTRING external_user;
+ /** Proxy user used for this connection. */
+ MYSQL_LEX_CSTRING proxy_user;
+ /** Connection host. */
+ MYSQL_LEX_CSTRING host;
+ /** IP of the connection. */
+ MYSQL_LEX_CSTRING ip;
+ /** Database name specified at connection time. */
+ MYSQL_LEX_CSTRING database;
+ /** Connection type:
+ - 0 Undefined
+ - 1 TCP/IP
+ - 2 Socket
+ - 3 Named pipe
+ - 4 SSL
+ - 5 Shared memory
+ */
+ int connection_type;
+};
+
+/**
+@enum mysql_event_parse_subclass_t
+
+Events for MYSQL_AUDIT_PARSE_CLASS event class.
+*/
+typedef enum
+{
+ /** occurs before the query parsing. */
+ MYSQL_AUDIT_PARSE_PREPARSE = 1 << 0,
+ /** occurs after the query parsing. */
+ MYSQL_AUDIT_PARSE_POSTPARSE = 1 << 1
+} mysql_event_parse_subclass_t;
+
+#define MYSQL_AUDIT_PARSE_ALL (MYSQL_AUDIT_PARSE_PREPARSE | \
+ MYSQL_AUDIT_PARSE_POSTPARSE)
+
+typedef enum
+{
+ MYSQL_AUDIT_PARSE_REWRITE_PLUGIN_NONE = 0,
+ /// mysql_event_parse::flags Must be set by a plugin if the query is rewritten.
+ MYSQL_AUDIT_PARSE_REWRITE_PLUGIN_QUERY_REWRITTEN = 1 << 0,
+ /// mysql_event_parse::flags Is set by the server if the query is prepared statement.
+ MYSQL_AUDIT_PARSE_REWRITE_PLUGIN_IS_PREPARED_STATEMENT = 1 << 1
+} mysql_event_parse_rewrite_plugin_flag;
+
+/** Data for the MYSQL_AUDIT_PARSE events */
+struct mysql_event_parse
+{
+ /** MYSQL_AUDIT_[PRE|POST]_PARSE event id */
+ mysql_event_parse_subclass_t event_subclass;
+
+ /** one of FLAG_REWRITE_PLUGIN_* */
+ mysql_event_parse_rewrite_plugin_flag *flags;
+
+ /** input: the original query text */
+ MYSQL_LEX_CSTRING query;
+
+ /** output: returns the null-terminated rewriten query allocated by my_malloc() */
+ MYSQL_LEX_CSTRING *rewritten_query;
+};
+
+/**
+ @enum mysql_event_authorization_subclass_t
+
+ Events for MYSQL_AUDIT_AUTHORIZATION_CLASS event class.
+*/
+typedef enum
+{
+ MYSQL_AUDIT_AUTHORIZATION_USER = 1 << 0,
+ /** Occurs when database privilege is checked. */
+ MYSQL_AUDIT_AUTHORIZATION_DB = 1 << 1,
+ /** Occurs when table privilege is checked. */
+ MYSQL_AUDIT_AUTHORIZATION_TABLE = 1 << 2,
+ /** Occurs when column privilege is checked. */
+ MYSQL_AUDIT_AUTHORIZATION_COLUMN = 1 << 3,
+ /** Occurs when procedure privilege is checked. */
+ MYSQL_AUDIT_AUTHORIZATION_PROCEDURE = 1 << 4,
+ /** Occurs when proxy privilege is checked. */
+ MYSQL_AUDIT_AUTHORIZATION_PROXY = 1 << 5
+} mysql_event_authorization_subclass_t;
+
+#define MYSQL_AUDIT_AUTHORIZATION_ALL (MYSQL_AUDIT_AUTHORIZATION_USER | \
+ MYSQL_AUDIT_AUTHORIZATION_DB | \
+ MYSQL_AUDIT_AUTHORIZATION_TABLE | \
+ MYSQL_AUDIT_AUTHORIZATION_COLUMN | \
+ MYSQL_AUDIT_AUTHORIZATION_PROCEDURE | \
+ MYSQL_AUDIT_AUTHORIZATION_PROXY)
+/**
+ @struct mysql_event_authorization
+
+ Structure for MYSQL_AUDIT_AUTHORIZATION_CLASS event class.
+*/
+struct mysql_event_authorization
+{
+ /** Event subclass. */
+ mysql_event_authorization_subclass_t event_subclass;
+ /** Event status. */
+ int status;
+ /** Connection id. */
+ unsigned int connection_id;
+ /** SQL command id. */
+ enum_sql_command_t sql_command_id;
+ /** SQL query text. */
+ MYSQL_LEX_CSTRING query;
+ /** SQL query charset. */
+ const struct charset_info_st *query_charset;
+ /** Database name. */
+ MYSQL_LEX_CSTRING database;
+ /** Table name. */
+ MYSQL_LEX_CSTRING table;
+ /** Other name associated with the event. */
+ MYSQL_LEX_CSTRING object;
+ /** Requested authorization privileges. */
+ unsigned long requested_privilege;
+ /** Currently granted authorization privileges. */
+ unsigned long granted_privilege;
+};
+
+/**
+ @enum mysql_event_table_row_access_subclass_t
+
+ Events for MYSQL_AUDIT_TABLE_ACCES_CLASS event class.
+*/
+typedef enum
+{
+ /** Occurs when table data are read. */
+ MYSQL_AUDIT_TABLE_ACCESS_READ = 1 << 0,
+ /** Occurs when table data are inserted. */
+ MYSQL_AUDIT_TABLE_ACCESS_INSERT = 1 << 1,
+ /** Occurs when table data are updated. */
+ MYSQL_AUDIT_TABLE_ACCESS_UPDATE = 1 << 2,
+ /** Occurs when table data are deleted. */
+ MYSQL_AUDIT_TABLE_ACCESS_DELETE = 1 << 3
+} mysql_event_table_access_subclass_t;
+
+#define MYSQL_AUDIT_TABLE_ACCESS_ALL (MYSQL_AUDIT_TABLE_ACCESS_READ | \
+ MYSQL_AUDIT_TABLE_ACCESS_INSERT | \
+ MYSQL_AUDIT_TABLE_ACCESS_UPDATE | \
+ MYSQL_AUDIT_TABLE_ACCESS_DELETE)
+
+/**
+ @struct mysql_event_table_row_access
+
+ Structure for MYSQL_AUDIT_TABLE_ACCES_CLASS event class.
+*/
+struct mysql_event_table_access
+{
+ /** Event subclass. */
+ mysql_event_table_access_subclass_t event_subclass;
+ /** Connection id. */
+ unsigned long connection_id;
+ /** SQL command id. */
+ enum_sql_command_t sql_command_id;
+ /** SQL query. */
+ MYSQL_LEX_CSTRING query;
+ /** SQL query charset. */
+ const struct charset_info_st *query_charset;
+ /** Database name. */
+ MYSQL_LEX_CSTRING table_database;
+ /** Table name. */
+ MYSQL_LEX_CSTRING table_name;
+};
+
+/**
+ @enum mysql_event_global_variable_subclass_t
+
+ Events for MYSQL_AUDIT_GLOBAL_VARIABLE_CLASS event class.
+*/
+typedef enum
+{
+ /** Occurs when global variable is retrieved. */
+ MYSQL_AUDIT_GLOBAL_VARIABLE_GET = 1 << 0,
+ /** Occurs when global variable is set. */
+ MYSQL_AUDIT_GLOBAL_VARIABLE_SET = 1 << 1
+} mysql_event_global_variable_subclass_t;
+
+#define MYSQL_AUDIT_GLOBAL_VARIABLE_ALL (MYSQL_AUDIT_GLOBAL_VARIABLE_GET | \
+ MYSQL_AUDIT_GLOBAL_VARIABLE_SET)
+
+/** Events for MYSQL_AUDIT_GLOBAL_VARIABLE_CLASS event class. */
+struct mysql_event_global_variable
+{
+ /** Event subclass. */
+ mysql_event_global_variable_subclass_t event_subclass;
+ /** Connection id. */
+ unsigned long connection_id;
+ /** SQL command id. */
+ enum_sql_command_t sql_command_id;
+ /** Variable name. */
+ MYSQL_LEX_CSTRING variable_name;
+ /** Variable value. */
+ MYSQL_LEX_CSTRING variable_value;
+};
+
+/**
+ @enum mysql_event_server_startup_subclass_t
+
+ Events for MYSQL_AUDIT_SERVER_STARTUP_CLASS event class.
+*/
+typedef enum
+{
+ /** Occurs after all subsystem are initialized during system start. */
+ MYSQL_AUDIT_SERVER_STARTUP_STARTUP = 1 << 0
+} mysql_event_server_startup_subclass_t;
+
+#define MYSQL_AUDIT_SERVER_STARTUP_ALL (MYSQL_AUDIT_SERVER_STARTUP_STARTUP)
+
+/**
+ @struct mysql_event_server_startup
+
+ Structure for MYSQL_AUDIT_SERVER_STARTUP_CLASS event class.
+*/
+struct mysql_event_server_startup
+{
+ /** Event subclass. */
+ mysql_event_server_startup_subclass_t event_subclass;
+ /** Command line arguments. */
+ const char **argv;
+ /** Command line arguments count. */
+ unsigned int argc;
+};
+
+/**
+ @enum mysql_event_server_shutdown_subclass_t
+
+ Events for MYSQL_AUDIT_SERVER_SHUTDOWN_CLASS event class.
+*/
+typedef enum
+{
+ /** Occurs when global variable is set. */
+ MYSQL_AUDIT_SERVER_SHUTDOWN_SHUTDOWN = 1 << 0
+} mysql_event_server_shutdown_subclass_t;
+
+#define MYSQL_AUDIT_SERVER_SHUTDOWN_ALL (MYSQL_AUDIT_SERVER_SHUTDOWN_SHUTDOWN)
+
+/**
+ @enum mysql_server_shutdown_reason_t
+
+ Server shutdown reason.
+*/
+typedef enum
+{
+ /** User requested shut down. */
+ MYSQL_AUDIT_SERVER_SHUTDOWN_REASON_SHUTDOWN,
+ /** The server aborts. */
+ MYSQL_AUDIT_SERVER_SHUTDOWN_REASON_ABORT
+} mysql_server_shutdown_reason_t;
+
+/**
+ @struct mysql_event_server_shutdown
+
+ Structure for MYSQL_AUDIT_SERVER_SHUTDOWN_CLASS event class.
+*/
+struct mysql_event_server_shutdown
+{
+ /** Shutdown event. */
+ mysql_event_server_shutdown_subclass_t event_subclass;
+ /** Exit code associated with the shutdown event. */
+ int exit_code;
+ /** Shutdown reason. */
+ mysql_server_shutdown_reason_t reason;
+};
+
+/**
+ @enum mysql_event_command_subclass_t
+
+ Events for MYSQL_AUDIT_COMMAND_CLASS event class.
+*/
+typedef enum
+{
+ /** Command start event. */
+ MYSQL_AUDIT_COMMAND_START = 1 << 0,
+ /** Command end event. */
+ MYSQL_AUDIT_COMMAND_END = 1 << 1
+} mysql_event_command_subclass_t;
+
+#define MYSQL_AUDIT_COMMAND_ALL (MYSQL_AUDIT_COMMAND_START | \
+ MYSQL_AUDIT_COMMAND_END)
+/**
+ @typedef enum_server_command_t
+
+ Server command type definition.
+*/
+typedef enum enum_server_command enum_server_command_t;
+
+/**
+ @struct mysql_event_command
+
+ Event for MYSQL_AUDIT_COMMAND_CLASS event class.
+ Events generated as a result of RPC command requests.
+*/
+struct mysql_event_command
+{
+ /** Command event subclass. */
+ mysql_event_command_subclass_t event_subclass;
+ /** Command event status. */
+ int status;
+ /** Connection id. */
+ unsigned long connection_id;
+ /** Command id. */
+ enum_server_command_t command_id;
+};
+
+/**
+ @enum mysql_event_query_subclass_t
+
+ Events for MYSQL_AUDIT_QUERY_CLASS event class.
+*/
+typedef enum
+{
+ /** Query start event. */
+ MYSQL_AUDIT_QUERY_START = 1 << 0,
+ /** Nested query start event. */
+ MYSQL_AUDIT_QUERY_NESTED_START = 1 << 1,
+ /** Query post parse event. */
+ MYSQL_AUDIT_QUERY_STATUS_END = 1 << 2,
+ /** Nested query status end event. */
+ MYSQL_AUDIT_QUERY_NESTED_STATUS_END = 1 << 3
+} mysql_event_query_subclass_t;
+
+#define MYSQL_AUDIT_QUERY_ALL (MYSQL_AUDIT_QUERY_START | \
+ MYSQL_AUDIT_QUERY_NESTED_START | \
+ MYSQL_AUDIT_QUERY_STATUS_END | \
+ MYSQL_AUDIT_QUERY_NESTED_STATUS_END)
+/**
+ @struct mysql_event_command
+
+ Event for MYSQL_AUDIT_COMMAND_CLASS event class.
+*/
+struct mysql_event_query
+{
+ /** Event subclass. */
+ mysql_event_query_subclass_t event_subclass;
+ /** Event status. */
+ int status;
+ /** Connection id. */
+ unsigned long connection_id;
+ /** SQL command id. */
+ enum_sql_command_t sql_command_id;
+ /** SQL query. */
+ MYSQL_LEX_CSTRING query;
+ /** SQL query charset. */
+ const struct charset_info_st *query_charset;
+};
+
+/**
+ @enum mysql_event_stored_program_subclass_t
+
+ Events for MYSQL_AUDIT_STORED_PROGRAM_CLASS event class.
+*/
+typedef enum
+{
+ /** Stored program execution event. */
+ MYSQL_AUDIT_STORED_PROGRAM_EXECUTE = 1 << 0
+} mysql_event_stored_program_subclass_t;
+
+#define MYSQL_AUDIT_STORED_PROGRAM_ALL (MYSQL_AUDIT_STORED_PROGRAM_EXECUTE)
+
+/**
+ @struct mysql_event_command
+
+Event for MYSQL_AUDIT_COMMAND_CLASS event class.
+*/
+struct mysql_event_stored_program
+{
+ /** Event subclass. */
+ mysql_event_stored_program_subclass_t event_subclass;
+ /** Connection id. */
+ unsigned long connection_id;
+ /** SQL command id. */
+ enum_sql_command_t sql_command_id;
+ /** SQL query text. */
+ MYSQL_LEX_CSTRING query;
+ /** SQL query charset. */
+ const struct charset_info_st *query_charset;
+ /** The Database the procedure is defined in. */
+ MYSQL_LEX_CSTRING database;
+ /** Name of the stored program. */
+ MYSQL_LEX_CSTRING name;
+ /** Stored program parameters. */
+ void *parameters;
+};
+
+#endif
diff --git a/plugin/server_audit/server_audit.c b/plugin/server_audit/server_audit.c
index 1c91c66759d..30b7cdb5dcb 100644
--- a/plugin/server_audit/server_audit.c
+++ b/plugin/server_audit/server_audit.c
@@ -14,13 +14,16 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-#define PLUGIN_VERSION 0x103
-#define PLUGIN_STR_VERSION "1.3.0"
+#define PLUGIN_VERSION 0x104
+#define PLUGIN_STR_VERSION "1.4.0"
+
+#define _my_thread_var loc_thread_var
#include <my_config.h>
#include <stdio.h>
#include <time.h>
#include <string.h>
+#include <fcntl.h>
#ifndef _WIN32
#include <syslog.h>
@@ -80,8 +83,7 @@ static void closelog() {}
#endif /*MARIADB_ONLY*/
#include <my_base.h>
-//#include <hash.h>
-#include <my_dir.h>
+//#include <my_dir.h>
#include <typelib.h>
#include <mysql/plugin.h>
#include <mysql/plugin_audit.h>
@@ -89,75 +91,176 @@ static void closelog() {}
#define RTLD_DEFAULT NULL
#endif
-#undef my_init_dynamic_array_ci
-#define init_dynamic_array2 loc_init_dynamic_array2
-#define my_init_dynamic_array_ci(A,B,C,D) loc_init_dynamic_array2(A,B,NULL,C,D)
-#define my_hash_init2 loc_my_hash_init
-#define my_hash_search loc_my_hash_search
-#define my_hash_insert loc_my_hash_insert
-#define my_hash_delete loc_my_hash_delete
-#define my_hash_update loc_my_hash_update
-#define my_hash_free loc_my_hash_free
-#define my_hash_first loc_my_hash_first
-#define my_hash_reset loc_my_hash_reset
-#define my_hash_search_using_hash_value loc_my_hash_search_using_hash_value
-#define my_hash_first_from_hash_value loc_my_hash_first_from_hash_value
-#define my_hash_sort loc_my_hash_sort
-#undef my_hash_first_from_hash_value
-#define my_hash_first_from_hash_value loc_my_my_hash_first_from_hash_value
-#define my_hash_next loc_my_hash_next
-#define my_hash_element loc_my_hash_element
-#define my_hash_replace loc_my_hash_replace
-#define my_hash_iterate loc_my_hash_iterate
-
-#define alloc_dynamic loc_alloc_dynamic
-#define pop_dynamic loc_pop_dynamic
-#define delete_dynamic loc_delete_dynamic
-void *loc_alloc_dynamic(DYNAMIC_ARRAY *array);
-#ifdef my_strnncoll
-#undef my_strnncoll
-#define my_strnncoll(s, a, b, c, d) (my_strnncoll_binary((s), (a), (b), (c), (d), 0))
-#endif
-
-static int my_strnncoll_binary(CHARSET_INFO * cs __attribute__((unused)),
- const uchar *s, size_t slen,
- const uchar *t, size_t tlen,
- my_bool t_is_prefix)
-{
- size_t len= slen < tlen ? slen : tlen;
- int cmp= memcmp(s,t,len);
- return cmp ? cmp : (int)((t_is_prefix ? len : slen) - tlen);
-}
-
-#include "../../mysys/array.c"
-#include "../../mysys/hash.c"
-
#ifndef MARIADB_ONLY
#undef MYSQL_SERVICE_LOGGER_INCLUDED
#undef MYSQL_DYNAMIC_PLUGIN
#define FLOGGER_NO_PSI
/* How to access the pthread_mutex in mysql_mutex_t */
-#ifdef SAFE_MUTEX
-#define mysql_mutex_real_mutex(A) &(A)->m_mutex.mutex
-#elif defined(MY_PTHREAD_FASTMUTEX)
-#define mysql_mutex_real_mutex(A) &(A)->m_mutex.mutex
-#else
+//#ifdef SAFE_MUTEX
+//#define mysql_mutex_real_mutex(A) &(A)->m_mutex.mutex
+//#elif defined(MY_PTHREAD_FASTMUTEX)
+//#define mysql_mutex_real_mutex(A) &(A)->m_mutex.mutex
+//#else
#define mysql_mutex_real_mutex(A) &(A)->m_mutex
-#endif
+//#endif
-#define flogger_mutex_init(A,B,C) pthread_mutex_init(mysql_mutex_real_mutex(B), C)
-#define flogger_mutex_destroy(A) pthread_mutex_destroy(mysql_mutex_real_mutex(A))
-#define flogger_mutex_lock(A) pthread_mutex_lock(mysql_mutex_real_mutex(A))
-#define flogger_mutex_unlock(A) pthread_mutex_unlock(mysql_mutex_real_mutex(A))
+#define flogger_mutex_init(A,B,C) do{}while(0)
+#define flogger_mutex_destroy(A) do{}while(0)
+#define flogger_mutex_lock(A) do{}while(0)
+#define flogger_mutex_unlock(A) do{}while(0)
static char **int_mysql_data_home;
static char *default_home= (char *)".";
#define mysql_data_home (*int_mysql_data_home)
+#define FLOGGER_SKIP_INCLUDES
+#define my_open(A, B, C) loc_open(A, B)
+#define my_close(A, B) loc_close(A)
+#define my_rename(A, B, C) loc_rename(A, B)
+#define my_tell(A, B) loc_tell(A)
+#define my_write(A, B, C, D) loc_write(A, B, C)
+#define my_malloc(A, B) malloc(A)
+#define my_free(A) free(A)
+#ifdef my_errno
+ #undef my_errno
+#endif
+static int loc_file_errno;
+#define my_errno loc_file_errno
+#ifdef my_vsnprintf
+ #undef my_vsnprintf
+#endif
+#define my_vsnprintf vsnprintf
+#define logger_open loc_logger_open
+#define logger_close loc_logger_close
+#define logger_write loc_logger_write
+#define logger_rotate loc_logger_rotate
+#define logger_init_mutexts loc_logger_init_mutexts
+
+
+static size_t loc_write(File Filedes, const uchar *Buffer, size_t Count)
+{
+ size_t writtenbytes;
+#ifdef _WIN32
+ writtenbytes= my_win_write(Filedes, Buffer, Count);
+#else
+ writtenbytes= write(Filedes, Buffer, Count);
+#endif
+ return writtenbytes;
+}
+
+
+static File loc_open(const char *FileName, int Flags)
+ /* Path-name of file */
+ /* Read | write .. */
+ /* Special flags */
+{
+ File fd;
+#if defined(_WIN32)
+ fd= my_win_open(FileName, Flags);
+#elif !defined(NO_OPEN_3)
+ fd = open(FileName, Flags, my_umask); /* Normal unix */
+#else
+ fd = open((char *) FileName, Flags);
+#endif
+ my_errno= errno;
+ return fd;
+}
+
+
+static int loc_close(File fd)
+{
+ int err;
+#ifndef _WIN32
+ do
+ {
+ err= close(fd);
+ } while (err == -1 && errno == EINTR);
+#else
+ err= my_win_close(fd);
+#endif
+ my_errno=errno;
+ return err;
+}
+
+
+static int loc_rename(const char *from, const char *to)
+{
+ int error = 0;
+
+#if defined(__WIN__)
+ if (!MoveFileEx(from, to, MOVEFILE_COPY_ALLOWED |
+ MOVEFILE_REPLACE_EXISTING))
+ {
+ my_osmaperr(GetLastError());
+#elif defined(HAVE_RENAME)
+ if (rename(from,to))
+ {
+#else
+ if (link(from, to) || unlink(from))
+ {
+#endif
+ my_errno=errno;
+ error = -1;
+ }
+ return error;
+}
+
+
+static my_off_t loc_seek(File fd, my_off_t pos, int whence)
+{
+ os_off_t newpos= -1;
+#ifdef _WIN32
+ newpos= my_win_lseek(fd, pos, whence);
+#else
+ newpos= lseek(fd, pos, whence);
+#endif
+ if (newpos == (os_off_t) -1)
+ {
+ my_errno= errno;
+ return MY_FILEPOS_ERROR;
+ }
+
+ return (my_off_t) newpos;
+}
+
+
+static my_off_t loc_tell(File fd)
+{
+ os_off_t pos;
+#if defined (HAVE_TELL) && !defined (_WIN32)
+ pos= tell(fd);
+#else
+ pos= loc_seek(fd, 0L, MY_SEEK_CUR);
+#endif
+ if (pos == (os_off_t) -1)
+ {
+ my_errno= errno;
+ }
+ return (my_off_t) pos;
+}
+
+#ifdef HAVE_PSI_INTERFACE
+#undef HAVE_PSI_INTERFACE
+#include <mysql/service_logger.h>
#include "../../mysys/file_logger.c"
+#define HAVE_PSI_INTERFACE
+#else
+#include <mysql/service_logger.h>
+#include "../../mysys/file_logger.c"
+#endif
#endif /*!MARIADB_ONLY*/
+#undef flogger_mutex_init
+#undef flogger_mutex_destroy
+#undef flogger_mutex_lock
+#undef flogger_mutex_unlock
+
+#define flogger_mutex_init(A,B,C) pthread_mutex_init(mysql_mutex_real_mutex(B), C)
+#define flogger_mutex_destroy(A) pthread_mutex_destroy(mysql_mutex_real_mutex(A))
+#define flogger_mutex_lock(A) pthread_mutex_lock(mysql_mutex_real_mutex(A))
+#define flogger_mutex_unlock(A) pthread_mutex_unlock(mysql_mutex_real_mutex(A))
+
#ifndef DBUG_OFF
#define PLUGIN_DEBUG_VERSION "-debug"
#else
@@ -178,7 +281,11 @@ static char *default_home= (char *)".";
extern char server_version[];
static const char *serv_ver= NULL;
static int started_mysql= 0;
+static int mysql_57_started= 0;
+static int debug_server_started= 0;
+static int use_event_data_for_disconnect= 0;
static int started_mariadb= 0;
+static int maria_55_started= 0;
static int maria_above_5= 0;
static char *incl_users, *excl_users,
*file_path, *syslog_info;
@@ -203,6 +310,27 @@ static char servhost[256];
static size_t servhost_len;
static char *syslog_ident;
static char syslog_ident_buffer[128]= "mysql-server_auditing";
+
+struct connection_info
+{
+ int header;
+ unsigned long thread_id;
+ unsigned long long query_id;
+ char db[256];
+ int db_length;
+ char user[64];
+ int user_length;
+ char host[64];
+ int host_length;
+ char ip[64];
+ int ip_length;
+ const char *query;
+ int query_length;
+ char query_buffer[1024];
+ time_t query_time;
+ int log_always;
+};
+
#define DEFAULT_FILENAME_LEN 16
static char default_file_name[DEFAULT_FILENAME_LEN+1]= "server_audit.log";
@@ -256,7 +384,8 @@ static TYPELIB events_typelib=
array_elements(event_names) - 1, "", event_names, NULL
};
static MYSQL_SYSVAR_SET(events, events, PLUGIN_VAR_RQCMDARG,
- "Specifies the set of events to monitor. Can be CONNECT, QUERY, TABLE, QUERY_DDL, QUERY_DML.",
+ "Specifies the set of events to monitor. Can be CONNECT, QUERY, TABLE,"
+ " QUERY_DDL, QUERY_DML, QUERY_DCL.",
NULL, NULL, 0, &events_typelib);
#define OUTPUT_SYSLOG 0
#define OUTPUT_FILE 1
@@ -297,6 +426,13 @@ static MYSQL_SYSVAR_UINT(query_log_limit, query_log_limit,
PLUGIN_VAR_OPCMDARG, "Limit on the length of the query string in a record.",
NULL, NULL, 1024, 0, 0x7FFFFFFF, 1);
+char locinfo_ini_value[sizeof(struct connection_info)+4];
+
+static MYSQL_THDVAR_STR(loc_info,
+ PLUGIN_VAR_READONLY | PLUGIN_VAR_MEMALLOC,
+ "Auxiliary info.", NULL, NULL,
+ locinfo_ini_value);
+
static const char *syslog_facility_names[]=
{
"LOG_USER", "LOG_MAIL", "LOG_DAEMON", "LOG_AUTH",
@@ -376,6 +512,7 @@ static struct st_mysql_sys_var* vars[] = {
MYSQL_SYSVAR(syslog_facility),
MYSQL_SYSVAR(syslog_priority),
MYSQL_SYSVAR(query_log_limit),
+ MYSQL_SYSVAR(loc_info),
NULL
};
@@ -386,6 +523,8 @@ static long log_write_failures= 0;
static char current_log_buf[FN_REFLEN]= "";
static char last_error_buf[512]= "";
+extern void *mysql_v4_descriptor;
+
static struct st_mysql_show_var audit_status[]=
{
{"server_audit_active", (char *)&is_active, SHOW_BOOL},
@@ -398,10 +537,14 @@ static struct st_mysql_show_var audit_status[]=
#if defined(HAVE_PSI_INTERFACE) && !defined(FLOGGER_NO_PSI)
/* These belong to the service initialization */
static PSI_mutex_key key_LOCK_operations;
+static PSI_mutex_key key_LOCK_bigbuffer;
static PSI_mutex_info mutex_key_list[]=
-{{ &key_LOCK_operations, "SERVER_AUDIT_plugin::lock_operations",
-{{ &key_LOCK_bigbuffer, "SERVER_AUDIT_plugin::lock_bigbuffer",
- PSI_FLAG_GLOBAL}};
+{
+ { &key_LOCK_operations, "SERVER_AUDIT_plugin::lock_operations",
+ PSI_FLAG_GLOBAL},
+ { &key_LOCK_bigbuffer, "SERVER_AUDIT_plugin::lock_bigbuffer",
+ PSI_FLAG_GLOBAL}
+};
#endif
static mysql_mutex_t lock_operations;
static mysql_mutex_t lock_bigbuffer;
@@ -425,7 +568,7 @@ static uchar *getkey_user(const char *entry, size_t *length,
}
-static void blank_user(uchar *user)
+static void blank_user(char *user)
{
for (; *user && *user != ','; user++)
*user= ' ';
@@ -485,19 +628,98 @@ static void remove_blanks(char *user)
}
-static int user_hash_fill(HASH *h, char *users,
- HASH *cmp_hash, int take_over_cmp)
+struct user_name
+{
+ int name_len;
+ char *name;
+};
+
+
+struct user_coll
+{
+ int n_users;
+ struct user_name *users;
+ int n_alloced;
+};
+
+
+static void coll_init(struct user_coll *c)
+{
+ c->n_users= 0;
+ c->users= 0;
+ c->n_alloced= 0;
+}
+
+
+static void coll_free(struct user_coll *c)
+{
+ if (c->users)
+ {
+ free(c->users);
+ coll_init(c);
+ }
+}
+
+
+static int cmp_users(const void *ia, const void *ib)
+{
+ const struct user_name *a= (const struct user_name *) ia;
+ const struct user_name *b= (const struct user_name *) ib;
+ int dl= a->name_len - b->name_len;
+ if (dl != 0)
+ return dl;
+
+ return strncmp(a->name, b->name, a->name_len);
+}
+
+
+static char *coll_search(struct user_coll *c, const char *n, int len)
+{
+ struct user_name un;
+ struct user_name *found;
+ un.name_len= len;
+ un.name= (char *) n;
+ found= (struct user_name*) bsearch(&un, c->users, c->n_users,
+ sizeof(c->users[0]), cmp_users);
+ return found ? found->name : 0;
+}
+
+
+static int coll_insert(struct user_coll *c, char *n, int len)
+{
+ if (c->n_users >= c->n_alloced)
+ {
+ c->n_alloced+= 128;
+ if (c->users == NULL)
+ c->users= malloc(c->n_alloced * sizeof(c->users[0]));
+ else
+ c->users= realloc(c->users, c->n_alloced * sizeof(c->users[0]));
+
+ if (c->users == NULL)
+ return 1;
+ }
+ c->users[c->n_users].name= n;
+ c->users[c->n_users].name_len= len;
+ c->n_users++;
+ return 0;
+}
+
+
+static void coll_sort(struct user_coll *c)
+{
+ qsort(c->users, c->n_users, sizeof(c->users[0]), cmp_users);
+}
+
+
+static int user_coll_fill(struct user_coll *c, char *users,
+ struct user_coll *cmp_c, int take_over_cmp)
{
char *orig_users= users;
- uchar *cmp_user= 0;
+ char *cmp_user= 0;
size_t cmp_length;
- int refill_cmp_hash= 0;
+ int refill_cmp_coll= 0;
- if (my_hash_inited(h))
- my_hash_reset(h);
- else
- loc_my_hash_init(h, 0, &my_charset_bin, 0x100, 0, 0,
- (my_hash_get_key) getkey_user, 0, 0, 0);
+ c->n_users= 0;
while (*users)
{
@@ -506,11 +728,10 @@ static int user_hash_fill(HASH *h, char *users,
if (!*users)
return 0;
-
- if (cmp_hash)
+ (void) getkey_user(users, &cmp_length, FALSE);
+ if (cmp_c)
{
- (void) getkey_user(users, &cmp_length, FALSE);
- cmp_user= my_hash_search(cmp_hash, (const uchar *) users, cmp_length);
+ cmp_user= coll_search(cmp_c, users, cmp_length);
if (cmp_user && take_over_cmp)
{
@@ -520,7 +741,7 @@ static int user_hash_fill(HASH *h, char *users,
MYF(ME_JUST_WARNING), (int) cmp_length, users);
internal_stop_logging= 0;
blank_user(cmp_user);
- refill_cmp_hash= 1;
+ refill_cmp_coll= 1;
}
else if (cmp_user)
{
@@ -532,7 +753,7 @@ static int user_hash_fill(HASH *h, char *users,
continue;
}
}
- if (my_hash_insert(h, (const uchar *) users))
+ if (coll_insert(c, users, cmp_length))
return 1;
while (*users && *users != ',')
users++;
@@ -541,15 +762,17 @@ static int user_hash_fill(HASH *h, char *users,
users++;
}
- if (refill_cmp_hash)
+ if (refill_cmp_coll)
{
remove_blanks(excl_users);
- return user_hash_fill(cmp_hash, excl_users, 0, 0);
+ return user_coll_fill(cmp_c, excl_users, 0, 0);
}
if (users > orig_users && users[-1] == ',')
users[-1]= 0;
+ coll_sort(c);
+
return 0;
}
@@ -678,48 +901,19 @@ static void error_header()
static LOGGER_HANDLE *logfile;
-static HASH incl_user_hash, excl_user_hash;
+static struct user_coll incl_user_coll, excl_user_coll;
static unsigned long long query_counter= 1;
-struct connection_info
-{
- unsigned long thread_id;
- unsigned long long query_id;
- char db[256];
- int db_length;
- char user[64];
- int user_length;
- char host[64];
- int host_length;
- char ip[64];
- int ip_length;
- const char *query;
- int query_length;
- char query_buffer[1024];
- time_t query_time;
- int log_always;
-};
-
-
-static HASH connection_hash;
-
-
-struct connection_info *alloc_connection()
-{
- return malloc(ALIGN_SIZE(sizeof(struct connection_info)));
-}
-
-void free_connection(void* pconn)
+static struct connection_info *get_loc_info(MYSQL_THD thd)
{
- (void) free(pconn);
+ return (struct connection_info *) THDVAR(thd, loc_info);
}
-static struct connection_info *find_connection(unsigned long id)
+static int ci_needs_setup(const struct connection_info *ci)
{
- return (struct connection_info *)
- my_hash_search(&connection_hash, (const uchar *) &id, sizeof(id));
+ return ci->header != 0;
}
@@ -883,15 +1077,24 @@ static int stop_logging()
return 0;
}
-static struct connection_info *
- add_connection(const struct mysql_event_connection *event)
+
+static void setup_connection_simple(struct connection_info *ci)
+{
+ ci->db_length= 0;
+ ci->user_length= 0;
+ ci->host_length= 0;
+ ci->ip_length= 0;
+ ci->query_length= 0;
+ ci->header= 0;
+}
+
+
+static void setup_connection_connect(struct connection_info *cn,
+ const struct mysql_event_connection *event)
{
- struct connection_info *cn= alloc_connection();
- if (!cn)
- return 0;
- cn->thread_id= event->thread_id;
cn->query_id= 0;
cn->log_always= 0;
+ cn->thread_id= event->thread_id;
get_str_n(cn->db, &cn->db_length, sizeof(cn->db),
event->database, event->database_length);
get_str_n(cn->user, &cn->user_length, sizeof(cn->db),
@@ -900,11 +1103,7 @@ static struct connection_info *
event->host, event->host_length);
get_str_n(cn->ip, &cn->ip_length, sizeof(cn->ip),
event->ip, event->ip_length);
-
- if (my_hash_insert(&connection_hash, (const uchar *) cn))
- return 0;
-
- return cn;
+ cn->header= 0;
}
@@ -927,46 +1126,43 @@ do { \
-static struct connection_info *
- add_connection_initdb(const struct mysql_event_general *event)
+static void setup_connection_initdb(struct connection_info *cn,
+ const struct mysql_event_general *event)
{
- struct connection_info *cn;
size_t user_len, host_len, ip_len;
char uh_buffer[512];
- if (get_user_host(event->general_user, event->general_user_length,
- uh_buffer, sizeof(uh_buffer),
- &user_len, &host_len, &ip_len) ||
- (cn= alloc_connection()) == NULL)
- return 0;
-
cn->thread_id= event->general_thread_id;
cn->query_id= 0;
cn->log_always= 0;
get_str_n(cn->db, &cn->db_length, sizeof(cn->db),
event->general_query, event->general_query_length);
- get_str_n(cn->user, &cn->user_length, sizeof(cn->db),
- uh_buffer, user_len);
- get_str_n(cn->host, &cn->host_length, sizeof(cn->host),
- uh_buffer+user_len+1, host_len);
- get_str_n(cn->ip, &cn->ip_length, sizeof(cn->ip),
- uh_buffer+user_len+1+host_len+1, ip_len);
-
- if (my_hash_insert(&connection_hash, (const uchar *) cn))
- return 0;
- return cn;
+ if (get_user_host(event->general_user, event->general_user_length,
+ uh_buffer, sizeof(uh_buffer),
+ &user_len, &host_len, &ip_len))
+ {
+ /* The user@host line is incorrect. */
+ cn->user_length= 0;
+ cn->host_length= 0;
+ cn->ip_length= 0;
+ }
+ else
+ {
+ get_str_n(cn->user, &cn->user_length, sizeof(cn->db),
+ uh_buffer, user_len);
+ get_str_n(cn->host, &cn->host_length, sizeof(cn->host),
+ uh_buffer+user_len+1, host_len);
+ get_str_n(cn->ip, &cn->ip_length, sizeof(cn->ip),
+ uh_buffer+user_len+1+host_len+1, ip_len);
+ }
+ cn->header= 0;
}
-static struct connection_info *
- add_connection_table(const struct mysql_event_table *event)
+static void setup_connection_table(struct connection_info *cn,
+ const struct mysql_event_table *event)
{
- struct connection_info *cn;
-
- if ((cn= alloc_connection()) == NULL)
- return 0;
-
cn->thread_id= event->thread_id;
cn->query_id= query_counter++;
cn->log_always= 0;
@@ -978,42 +1174,40 @@ static struct connection_info *
event->host, SAFE_STRLEN(event->host));
get_str_n(cn->ip, &cn->ip_length, sizeof(cn->ip),
event->ip, SAFE_STRLEN(event->ip));
-
- if (my_hash_insert(&connection_hash, (const uchar *) cn))
- return 0;
-
- return cn;
+ cn->header= 0;
}
-static struct connection_info *
- add_connection_query(const struct mysql_event_general *event)
+static void setup_connection_query(struct connection_info *cn,
+ const struct mysql_event_general *event)
{
- struct connection_info *cn;
size_t user_len, host_len, ip_len;
char uh_buffer[512];
- if (get_user_host(event->general_user, event->general_user_length,
- uh_buffer, sizeof(uh_buffer),
- &user_len, &host_len, &ip_len) ||
- (cn= alloc_connection()) == NULL)
- return 0;
-
cn->thread_id= event->general_thread_id;
cn->query_id= query_counter++;
cn->log_always= 0;
get_str_n(cn->db, &cn->db_length, sizeof(cn->db), "", 0);
- get_str_n(cn->user, &cn->user_length, sizeof(cn->db),
- uh_buffer, user_len);
- get_str_n(cn->host, &cn->host_length, sizeof(cn->host),
- uh_buffer+user_len+1, host_len);
- get_str_n(cn->ip, &cn->ip_length, sizeof(cn->ip),
- uh_buffer+user_len+1+host_len+1, ip_len);
- if (my_hash_insert(&connection_hash, (const uchar *) cn))
- return 0;
-
- return cn;
+ if (get_user_host(event->general_user, event->general_user_length,
+ uh_buffer, sizeof(uh_buffer),
+ &user_len, &host_len, &ip_len))
+ {
+ /* The user@host line is incorrect. */
+ cn->user_length= 0;
+ cn->host_length= 0;
+ cn->ip_length= 0;
+ }
+ else
+ {
+ get_str_n(cn->user, &cn->user_length, sizeof(cn->db),
+ uh_buffer, user_len);
+ get_str_n(cn->host, &cn->host_length, sizeof(cn->host),
+ uh_buffer+user_len+1, host_len);
+ get_str_n(cn->ip, &cn->ip_length, sizeof(cn->ip),
+ uh_buffer+user_len+1+host_len+1, ip_len);
+ }
+ cn->header= 0;
}
@@ -1105,6 +1299,27 @@ static int log_connection(const struct connection_info *cn,
}
+static int log_connection_event(const struct mysql_event_connection *event,
+ const char *type)
+{
+ time_t ctime;
+ size_t csize;
+ char message[1024];
+
+ (void) time(&ctime);
+ csize= log_header(message, sizeof(message)-1, &ctime,
+ servhost, servhost_len,
+ event->user, event->user_length,
+ event->host, event->host_length,
+ event->ip, event->ip_length,
+ event->thread_id, 0, type);
+ csize+= my_snprintf(message+csize, sizeof(message) - 1 - csize,
+ ",%.*s,,%d", event->database_length, event->database, event->status);
+ message[csize]= '\n';
+ return write_log(message, csize + 1);
+}
+
+
static size_t escape_string(const char *str, unsigned int len,
char *result, size_t result_len)
{
@@ -1250,11 +1465,11 @@ static int do_log_user(const char *name)
return 0;
len= strlen(name);
- if (incl_user_hash.records)
- return my_hash_search(&incl_user_hash, (const uchar *) name, len) != 0;
+ if (incl_user_coll.n_users)
+ return coll_search(&incl_user_coll, name, len) != 0;
- if (excl_user_hash.records)
- return my_hash_search(&excl_user_hash, (const uchar *) name, len) == 0;
+ if (excl_user_coll.n_users)
+ return coll_search(&excl_user_coll, name, len) == 0;
return 1;
}
@@ -1592,14 +1807,14 @@ static void update_general_user(struct connection_info *cn,
}
+static struct connection_info ci_disconnect_buffer;
+
#define AA_FREE_CONNECTION 1
#define AA_CHANGE_USER 2
-static struct connection_info *update_connection_hash(unsigned int event_class,
- const void *ev,
- int *after_action)
+static void update_connection_info(struct connection_info *cn,
+ unsigned int event_class, const void *ev, int *after_action)
{
- struct connection_info *cn= NULL;
*after_action= 0;
switch (event_class) {
@@ -1612,13 +1827,17 @@ static struct connection_info *update_connection_hash(unsigned int event_class,
{
int init_db_command= event->general_command_length == 7 &&
strncmp(event->general_command, "Init DB", 7) == 0;
- if ((cn= find_connection(event->general_thread_id)))
+ if (!ci_needs_setup(cn))
{
if (init_db_command)
{
/* Change DB */
- get_str_n(cn->db, &cn->db_length, sizeof(cn->db),
- event->general_query, event->general_query_length);
+ if (mysql_57_started)
+ get_str_n(cn->db, &cn->db_length, sizeof(cn->db),
+ event->database, event->database_length);
+ else
+ get_str_n(cn->db, &cn->db_length, sizeof(cn->db),
+ event->general_query, event->general_query_length);
}
cn->query_id= mode ? query_counter++ : event->query_id;
cn->query= event->general_query;
@@ -1627,18 +1846,19 @@ static struct connection_info *update_connection_hash(unsigned int event_class,
update_general_user(cn, event);
}
else if (init_db_command)
- cn= add_connection_initdb(event);
+ setup_connection_initdb(cn, event);
else if (event_query_command(event))
- cn= add_connection_query(event);
+ setup_connection_query(cn, event);
+ else
+ setup_connection_simple(cn);
break;
}
case MYSQL_AUDIT_GENERAL_STATUS:
if (event_query_command(event))
{
- if (!(cn= find_connection(event->general_thread_id)) &&
- !(cn= add_connection_query(event)))
- return 0;
+ if (ci_needs_setup(cn))
+ setup_connection_query(cn, event);
if (mode == 0 && cn->db_length == 0 && event->database_length > 0)
get_str_n(cn->db, &cn->db_length, sizeof(cn->db),
@@ -1664,13 +1884,13 @@ static struct connection_info *update_connection_hash(unsigned int event_class,
}
break;
case MYSQL_AUDIT_GENERAL_ERROR:
- /* We need this because of a bug in the MariaDB */
- /* that it returns NULL query field for the */
- /* MYSQL_AUDIT_GENERAL_STATUS in the mysqld_stmt_prepare. */
- /* As a result we get empty QUERY field for errors. */
- if (!(cn= find_connection(event->general_thread_id)) &&
- !(cn= add_connection_query(event)))
- return 0;
+ /*
+ We need this because the MariaDB returns NULL query field for the
+ MYSQL_AUDIT_GENERAL_STATUS in the mysqld_stmt_prepare.
+ As a result we get empty QUERY field for errors.
+ */
+ if (ci_needs_setup(cn))
+ setup_connection_query(cn, event);
cn->query_id= mode ? query_counter++ : event->query_id;
get_str_n(cn->query_buffer, &cn->query_length, sizeof(cn->query_buffer),
event->general_query, event->general_query_length);
@@ -1685,9 +1905,9 @@ static struct connection_info *update_connection_hash(unsigned int event_class,
{
const struct mysql_event_table *event =
(const struct mysql_event_table *) ev;
- if (!(cn= find_connection(event->thread_id)) &&
- !(cn= add_connection_table(event)))
- return 0;
+ if (ci_needs_setup(cn))
+ setup_connection_table(cn, event);
+
if (cn->user_length == 0 && cn->host_length == 0 && cn->ip_length == 0)
{
get_str_n(cn->user, &cn->user_length, sizeof(cn->user),
@@ -1713,17 +1933,10 @@ static struct connection_info *update_connection_hash(unsigned int event_class,
switch (event->event_subclass)
{
case MYSQL_AUDIT_CONNECTION_CONNECT:
- cn= add_connection(ev);
- break;
- case MYSQL_AUDIT_CONNECTION_DISCONNECT:
- cn= find_connection(event->thread_id);
- if (cn)
- *after_action= AA_FREE_CONNECTION;
+ setup_connection_connect(cn, event);
break;
case MYSQL_AUDIT_CONNECTION_CHANGE_USER:
- cn= find_connection(event->thread_id);
- if (cn)
- *after_action= AA_CHANGE_USER;
+ *after_action= AA_CHANGE_USER;
break;
default:;
}
@@ -1732,17 +1945,17 @@ static struct connection_info *update_connection_hash(unsigned int event_class,
default:
break;
}
- return cn;
}
+struct connection_info cn_error_buffer;
+
+
#define FILTER(MASK) (events == 0 || (events & MASK))
-static void auditing(MYSQL_THD thd __attribute__((unused)),
- unsigned int event_class,
- const void *ev)
+void auditing(MYSQL_THD thd, unsigned int event_class, const void *ev)
{
- struct connection_info *cn;
- int after_action;
+ struct connection_info *cn= 0;
+ int after_action= 0;
/* That one is important as this function can be called with */
/* &lock_operations locked when the server logs an error reported */
@@ -1752,8 +1965,35 @@ static void auditing(MYSQL_THD thd __attribute__((unused)),
flogger_mutex_lock(&lock_operations);
- if (!(cn= update_connection_hash(event_class, ev, &after_action)))
- goto exit_func;
+ if (maria_55_started && debug_server_started &&
+ event_class == MYSQL_AUDIT_GENERAL_CLASS)
+ {
+ /*
+ There's a bug in MariaDB 5.5 that prevents using thread local
+ variables in some cases.
+ The 'select * from notexisting_table;' query produces such case.
+ So just use the static buffer in this case.
+ */
+ const struct mysql_event_general *event =
+ (const struct mysql_event_general *) ev;
+
+ if (event->event_subclass == MYSQL_AUDIT_GENERAL_ERROR ||
+ (event->event_subclass == MYSQL_AUDIT_GENERAL_STATUS &&
+ event->general_query_length == 0 &&
+ cn_error_buffer.query_id == event->query_id))
+ {
+ cn= &cn_error_buffer;
+ cn->header= 1;
+ }
+ else
+ cn= get_loc_info(thd);
+ }
+ else
+ {
+ cn= get_loc_info(thd);
+ }
+
+ update_connection_info(cn, event_class, ev, &after_action);
if (!logging)
goto exit_func;
@@ -1767,8 +2007,11 @@ static void auditing(MYSQL_THD thd __attribute__((unused)),
/*
Only one subclass is logged.
*/
- if (event->event_subclass == MYSQL_AUDIT_GENERAL_STATUS)
+ if (event->event_subclass == MYSQL_AUDIT_GENERAL_STATUS &&
+ event_query_command(event))
+ {
log_statement(cn, event, "QUERY");
+ }
}
else if (event_class == MYSQL_AUDIT_TABLE_CLASS && FILTER(EVENT_TABLE) && cn)
{
@@ -1809,7 +2052,10 @@ static void auditing(MYSQL_THD thd __attribute__((unused)),
log_connection(cn, event, event->status ? "FAILED_CONNECT": "CONNECT");
break;
case MYSQL_AUDIT_CONNECTION_DISCONNECT:
- log_connection(cn, event, "DISCONNECT");
+ if (use_event_data_for_disconnect)
+ log_connection_event(event, "DISCONNECT");
+ else
+ log_connection(&ci_disconnect_buffer, event, "DISCONNECT");
break;
case MYSQL_AUDIT_CONNECTION_CHANGE_USER:
log_connection(cn, event, "CHANGEUSER");
@@ -1824,10 +2070,6 @@ exit_func:
if (after_action)
{
switch (after_action) {
- case AA_FREE_CONNECTION:
- my_hash_delete(&connection_hash, (uchar *) cn);
- cn= 0;
- break;
case AA_CHANGE_USER:
{
const struct mysql_event_connection *event =
@@ -1845,28 +2087,6 @@ exit_func:
}
-#ifdef DBUG_OFF
- #ifdef __x86_64__
-static const int cmd_off= 4200;
-static const int db_off= 120;
-static const int db_len_off= 128;
- #else
-static const int cmd_off= 2668;
-static const int db_off= 60;
-static const int db_len_off= 64;
- #endif /*x86_64*/
-#else
- #ifdef __x86_64__
-static const int cmd_off= 4432;
-static const int db_off= 120;
-static const int db_len_off= 128;
- #else
-static const int cmd_off= 2808;
-static const int db_off= 64;
-static const int db_len_off= 68;
- #endif /*x86_64*/
-#endif /*DBUG_OFF*/
-
struct mysql_event_general_v8
{
unsigned int event_class;
@@ -1884,8 +2104,31 @@ struct mysql_event_general_v8
unsigned long long general_rows;
};
+
static void auditing_v8(MYSQL_THD thd, struct mysql_event_general_v8 *ev_v8)
{
+#ifdef DBUG_OFF
+ #ifdef __x86_64__
+ static const int cmd_off= 4200;
+ static const int db_off= 120;
+ static const int db_len_off= 128;
+ #else
+ static const int cmd_off= 2668;
+ static const int db_off= 60;
+ static const int db_len_off= 64;
+ #endif /*x86_64*/
+#else
+ #ifdef __x86_64__
+ static const int cmd_off= 4432;
+ static const int db_off= 120;
+ static const int db_len_off= 128;
+ #else
+ static const int cmd_off= 2808;
+ static const int db_off= 64;
+ static const int db_len_off= 68;
+ #endif /*x86_64*/
+#endif /*DBUG_OFF*/
+
struct mysql_event_general event;
if (ev_v8->event_class != MYSQL_AUDIT_GENERAL_CLASS)
@@ -1944,6 +2187,41 @@ static void auditing_v13(MYSQL_THD thd, unsigned int *ev_v0)
}
+int get_db_mysql57(MYSQL_THD thd, char **name, int *len)
+{
+ int db_off;
+ int db_len_off;
+ if (debug_server_started)
+ {
+#ifdef __x86_64__
+ db_off= 608;
+ db_len_off= 616;
+#else
+ db_off= 0;
+ db_len_off= 0;
+#endif /*x86_64*/
+ }
+ else
+ {
+#ifdef __x86_64__
+ db_off= 536;
+ db_len_off= 544;
+#else
+ db_off= 0;
+ db_len_off= 0;
+#endif /*x86_64*/
+ }
+
+#ifdef __linux__
+ *name= *(char **) (((char *) thd) + db_off);
+ *len= *((int *) (((char*) thd) + db_len_off));
+ if (*name && (*name)[*len] != 0)
+ return 1;
+ return 0;
+#else
+ return 1;
+#endif
+}
/*
As it's just too difficult to #include "sql_class.h",
let's just copy the necessary part of the system_variables
@@ -2070,8 +2348,8 @@ static int server_audit_init(void *p __attribute__((unused)))
flogger_mutex_init(key_LOCK_operations, &lock_operations, MY_MUTEX_INIT_FAST);
flogger_mutex_init(key_LOCK_operations, &lock_bigbuffer, MY_MUTEX_INIT_FAST);
- my_hash_clear(&incl_user_hash);
- my_hash_clear(&excl_user_hash);
+ coll_init(&incl_user_coll);
+ coll_init(&excl_user_coll);
if (incl_users)
{
@@ -2089,9 +2367,6 @@ static int server_audit_init(void *p __attribute__((unused)))
update_excl_users(NULL, NULL, NULL, &excl_users);
}
- loc_my_hash_init(&connection_hash, 0, &my_charset_bin, 0x100, 0,
- sizeof(unsigned long), 0, 0, free_connection, 0);
-
error_header();
fprintf(stderr, "MariaDB Audit Plugin version %s%s STARTED.\n",
PLUGIN_STR_VERSION, PLUGIN_DEBUG_VERSION);
@@ -2115,6 +2390,16 @@ static int server_audit_init(void *p __attribute__((unused)))
}
}
+ ci_disconnect_buffer.header= 10;
+ ci_disconnect_buffer.thread_id= 0;
+ ci_disconnect_buffer.query_id= 0;
+ ci_disconnect_buffer.db_length= 0;
+ ci_disconnect_buffer.user_length= 0;
+ ci_disconnect_buffer.host_length= 0;
+ ci_disconnect_buffer.ip_length= 0;
+ ci_disconnect_buffer.query= empty_str;
+ ci_disconnect_buffer.query_length= 0;
+
if (logging)
start_logging();
@@ -2133,13 +2418,8 @@ static int server_audit_init_mysql(void *p)
static int server_audit_deinit(void *p __attribute__((unused)))
{
- if (my_hash_inited(&incl_user_hash))
- my_hash_free(&incl_user_hash);
-
- if (my_hash_inited(&excl_user_hash))
- my_hash_free(&excl_user_hash);
-
- my_hash_free(&connection_hash);
+ coll_free(&incl_user_coll);
+ coll_free(&excl_user_coll);
if (output_type == OUTPUT_FILE && logfile)
logger_close(logfile);
@@ -2174,6 +2454,7 @@ static struct st_mysql_audit mysql_descriptor =
{ MYSQL_AUDIT_GENERAL_CLASSMASK | MYSQL_AUDIT_CONNECTION_CLASSMASK }
};
+
mysql_declare_plugin(server_audit)
{
MYSQL_AUDIT_PLUGIN,
@@ -2224,22 +2505,21 @@ maria_declare_plugin_end;
static void mark_always_logged(MYSQL_THD thd)
{
struct connection_info *cn;
- if (thd && (cn= find_connection(thd_get_thread_id(thd))))
+ if (thd && (cn= get_loc_info(thd)))
cn->log_always= 1;
}
static void log_current_query(MYSQL_THD thd)
{
- unsigned long thd_id;
struct connection_info *cn;
- if (!thd ||
- !(cn= find_connection((thd_id= thd_get_thread_id(thd)))))
+ if (!thd)
return;
- if (FILTER(EVENT_QUERY) && do_log_user(cn->user))
+ cn= get_loc_info(thd);
+ if (!ci_needs_setup(cn) && FILTER(EVENT_QUERY) && do_log_user(cn->user))
{
- log_statement_ex(cn, cn->query_time, thd_id, cn->query, cn->query_length,
- 0, "QUERY");
+ log_statement_ex(cn, cn->query_time, thd_get_thread_id(thd),
+ cn->query, cn->query_length, 0, "QUERY");
cn->log_always= 1;
}
}
@@ -2251,7 +2531,8 @@ static void update_file_path(MYSQL_THD thd,
{
char *new_name= (*(char **) save) ? *(char **) save : empty_str;
- flogger_mutex_lock(&lock_operations);
+ if (!maria_55_started || !debug_server_started)
+ flogger_mutex_lock(&lock_operations);
internal_stop_logging= 1;
error_header();
fprintf(stderr, "Log file name was changed to '%s'.\n", new_name);
@@ -2287,7 +2568,8 @@ static void update_file_path(MYSQL_THD thd,
file_path= path_buffer;
exit_func:
internal_stop_logging= 0;
- flogger_mutex_unlock(&lock_operations);
+ if (!maria_55_started || !debug_server_started)
+ flogger_mutex_unlock(&lock_operations);
}
@@ -2331,14 +2613,16 @@ static void update_incl_users(MYSQL_THD thd,
void *var_ptr __attribute__((unused)), const void *save)
{
char *new_users= (*(char **) save) ? *(char **) save : empty_str;
- flogger_mutex_lock(&lock_operations);
+ if (!maria_55_started || !debug_server_started)
+ flogger_mutex_lock(&lock_operations);
mark_always_logged(thd);
strncpy(incl_user_buffer, new_users, sizeof(incl_user_buffer));
incl_users= incl_user_buffer;
- user_hash_fill(&incl_user_hash, incl_users, &excl_user_hash, 1);
+ user_coll_fill(&incl_user_coll, incl_users, &excl_user_coll, 1);
error_header();
fprintf(stderr, "server_audit_incl_users set to '%s'.\n", incl_users);
- flogger_mutex_unlock(&lock_operations);
+ if (!maria_55_started || !debug_server_started)
+ flogger_mutex_unlock(&lock_operations);
}
@@ -2347,14 +2631,16 @@ static void update_excl_users(MYSQL_THD thd __attribute__((unused)),
void *var_ptr __attribute__((unused)), const void *save)
{
char *new_users= (*(char **) save) ? *(char **) save : empty_str;
- flogger_mutex_lock(&lock_operations);
+ if (!maria_55_started || !debug_server_started)
+ flogger_mutex_lock(&lock_operations);
mark_always_logged(thd);
strncpy(excl_user_buffer, new_users, sizeof(excl_user_buffer));
excl_users= excl_user_buffer;
- user_hash_fill(&excl_user_hash, excl_users, &incl_user_hash, 0);
+ user_coll_fill(&excl_user_coll, excl_users, &incl_user_coll, 0);
error_header();
fprintf(stderr, "server_audit_excl_users set to '%s'.\n", excl_users);
- flogger_mutex_unlock(&lock_operations);
+ if (!maria_55_started || !debug_server_started)
+ flogger_mutex_unlock(&lock_operations);
}
@@ -2430,7 +2716,8 @@ static void update_logging(MYSQL_THD thd,
if (new_logging == logging)
return;
- flogger_mutex_lock(&lock_operations);
+ if (!maria_55_started || !debug_server_started)
+ flogger_mutex_lock(&lock_operations);
internal_stop_logging= 1;
if ((logging= new_logging))
{
@@ -2447,7 +2734,8 @@ static void update_logging(MYSQL_THD thd,
}
internal_stop_logging= 0;
- flogger_mutex_unlock(&lock_operations);
+ if (!maria_55_started || !debug_server_started)
+ flogger_mutex_unlock(&lock_operations);
}
@@ -2459,14 +2747,16 @@ static void update_mode(MYSQL_THD thd __attribute__((unused)),
if (mode_readonly || new_mode == mode)
return;
- flogger_mutex_lock(&lock_operations);
+ if (!maria_55_started || !debug_server_started)
+ flogger_mutex_lock(&lock_operations);
internal_stop_logging= 1;
mark_always_logged(thd);
error_header();
fprintf(stderr, "Logging mode was changed from %d to %d.\n", mode, new_mode);
mode= new_mode;
internal_stop_logging= 0;
- flogger_mutex_unlock(&lock_operations);
+ if (!maria_55_started || !debug_server_started)
+ flogger_mutex_unlock(&lock_operations);
}
@@ -2490,6 +2780,13 @@ static void update_syslog_ident(MYSQL_THD thd __attribute__((unused)),
}
+struct st_my_thread_var *loc_thread_var(void)
+{
+ return 0;
+}
+
+
+
#ifdef _WIN32
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
@@ -2507,9 +2804,18 @@ void __attribute__ ((constructor)) audit_plugin_so_init(void)
goto exit;
started_mariadb= strstr(serv_ver, "MariaDB") != 0;
+ debug_server_started= strstr(serv_ver, "debug") != 0;
- if (!started_mariadb)
+ if (started_mariadb)
{
+ if (serv_ver[0] == '1')
+ use_event_data_for_disconnect= 1;
+ else
+ maria_55_started= 1;
+ }
+ else
+ {
+ /* Started MySQL. */
if (serv_ver[0] == '5' && serv_ver[2] == '5')
{
int sc= serv_ver[4] - '0';
@@ -2526,7 +2832,25 @@ void __attribute__ ((constructor)) audit_plugin_so_init(void)
mysql_descriptor.event_notify= (void *) auditing_v13;
}
}
+ else if (serv_ver[0] == '5' && serv_ver[2] == '6')
+ {
+ int sc= serv_ver[4] - '0';
+ if (serv_ver[5] >= '0' && serv_ver[5] <= '9')
+ sc= sc * 10 + serv_ver[5] - '0';
+ if (sc >= 24)
+ use_event_data_for_disconnect= 1;
+ }
+ else if (serv_ver[0] == '5' && serv_ver[2] == '7')
+ {
+ mysql_57_started= 1;
+ _mysql_plugin_declarations_[0].info= mysql_v4_descriptor;
+ use_event_data_for_disconnect= 1;
+ }
}
+
+ memset(locinfo_ini_value, 'O', sizeof(locinfo_ini_value)-1);
+ locinfo_ini_value[sizeof(locinfo_ini_value)-1]= 0;
+
exit:
#ifdef _WIN32
return 1;
diff --git a/plugin/server_audit/test_audit_v4.c b/plugin/server_audit/test_audit_v4.c
new file mode 100644
index 00000000000..ae7527f8449
--- /dev/null
+++ b/plugin/server_audit/test_audit_v4.c
@@ -0,0 +1,162 @@
+#define PLUGIN_CONTEXT
+
+#include <stdio.h>
+
+typedef void *MYSQL_THD;
+struct st_mysql_const_lex_string
+{
+ const char *str;
+ size_t length;
+};
+typedef struct st_mysql_const_lex_string MYSQL_LEX_CSTRING;
+enum enum_sql_command{ SQLCOM_A, SQLCOM_B };
+enum enum_server_command{ SERVCOM_A, SERVCOM_B };
+
+#include "plugin_audit_v4.h"
+
+extern void auditing(MYSQL_THD thd, unsigned int event_class, const void *ev);
+extern int get_db_mysql57(MYSQL_THD thd, char **name, int *len);
+
+
+struct mysql_event_general_302
+{
+ unsigned int event_subclass;
+ int general_error_code;
+ unsigned long general_thread_id;
+ const char *general_user;
+ unsigned int general_user_length;
+ const char *general_command;
+ unsigned int general_command_length;
+ const char *general_query;
+ unsigned int general_query_length;
+ struct charset_info_st *general_charset;
+ unsigned long long general_time;
+ unsigned long long general_rows;
+ unsigned long long query_id;
+ char *database;
+ int database_length;
+};
+
+
+static int auditing_v4(MYSQL_THD thd, mysql_event_class_t class, const void *ev)
+{
+ int *subclass= (int *)ev;
+ struct mysql_event_general_302 ev_302;
+ int subclass_v3, subclass_orig;
+
+ if (class != MYSQL_AUDIT_GENERAL_CLASS &&
+ class != MYSQL_AUDIT_CONNECTION_CLASS)
+ return 0;
+
+ subclass_orig= *subclass;
+
+ if (class == MYSQL_AUDIT_GENERAL_CLASS)
+ {
+ struct mysql_event_general *event= (struct mysql_event_general *) ev;
+ ev_302.general_error_code= event->general_error_code;
+ ev_302.general_thread_id= event->general_thread_id;
+ ev_302.general_user= event->general_user.str;
+ ev_302.general_user_length= event->general_user.length;
+ ev_302.general_command= event->general_command.str;
+ ev_302.general_command_length= event->general_command.length;
+ ev_302.general_query= event->general_query.str;
+ ev_302.general_query_length= event->general_query.length;
+ ev_302.general_charset= event->general_charset;
+ ev_302.general_time= event->general_time;
+ ev_302.general_rows= event->general_rows;
+ if (get_db_mysql57(thd, &ev_302.database, &ev_302.database_length))
+ {
+ ev_302.database= 0;
+ ev_302.database_length= 0;
+ }
+ ev= &ev_302;
+ switch (subclass_orig)
+ {
+ case MYSQL_AUDIT_GENERAL_LOG:
+ subclass_v3= 0;
+ ev_302.event_subclass= 0;
+ break;
+ case MYSQL_AUDIT_GENERAL_ERROR:
+ subclass_v3= 1;
+ ev_302.event_subclass= 1;
+ break;
+ case MYSQL_AUDIT_GENERAL_RESULT:
+ subclass_v3= 2;
+ ev_302.event_subclass= 2;
+ break;
+ case MYSQL_AUDIT_GENERAL_STATUS:
+ {
+ subclass_v3= 3;
+ ev_302.event_subclass= 3;
+ break;
+ }
+ default:
+ return 0;
+ }
+ }
+ else /* if (class == MYSQL_AUDIT_CONNECTION_CLASS) */
+ {
+ switch (subclass_orig)
+ {
+ case MYSQL_AUDIT_CONNECTION_CONNECT:
+ subclass_v3= 0;
+ break;
+ case MYSQL_AUDIT_CONNECTION_DISCONNECT:
+ subclass_v3= 1;
+ break;
+ default:
+ return 0;
+ }
+ }
+
+ *subclass= subclass_v3;
+
+ auditing(thd, (int) class, ev);
+
+ *subclass= subclass_orig;
+ return 0;
+}
+
+
+static struct st_mysql_audit mysql_descriptor =
+{
+ MYSQL_AUDIT_INTERFACE_VERSION,
+ NULL,
+ auditing_v4,
+ { (unsigned long) MYSQL_AUDIT_GENERAL_ALL,
+ (unsigned long) MYSQL_AUDIT_CONNECTION_ALL,
+ (unsigned long) MYSQL_AUDIT_PARSE_ALL,
+ 0, /* This event class is currently not supported. */
+ 0, /* This event class is currently not supported. */
+ (unsigned long) MYSQL_AUDIT_GLOBAL_VARIABLE_ALL,
+ (unsigned long) MYSQL_AUDIT_SERVER_STARTUP_ALL,
+ (unsigned long) MYSQL_AUDIT_SERVER_SHUTDOWN_ALL,
+ (unsigned long) MYSQL_AUDIT_COMMAND_ALL,
+ (unsigned long) MYSQL_AUDIT_QUERY_ALL,
+ (unsigned long) MYSQL_AUDIT_STORED_PROGRAM_ALL }
+#ifdef WHEN_MYSQL_BUG_FIXED
+ /*
+ By this moment MySQL just sends no notifications at all
+ when we request only those we actually need.
+ So we have to request everything and filter them inside the
+ handling function.
+ */
+ { (unsigned long) MYSQL_AUDIT_GENERAL_ALL,
+ (unsigned long) (MYSQL_AUDIT_CONNECTION_CONNECT |
+ MYSQL_AUDIT_CONNECTION_DISCONNECT),
+ 0,
+ 0, /* This event class is currently not supported. */
+ 0, /* This event class is currently not supported. */
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0
+ }
+#endif /*WHEN_MYSQL_BUG_FIXED*/
+};
+
+
+void *mysql_v4_descriptor= &mysql_descriptor;
+
diff --git a/sql-common/client.c b/sql-common/client.c
index d20759cc0ad..26f02734d25 100644
--- a/sql-common/client.c
+++ b/sql-common/client.c
@@ -1,5 +1,5 @@
-/* Copyright (c) 2003, 2014, Oracle and/or its affiliates.
- Copyright (c) 2009, 2015, MariaDB
+/* Copyright (c) 2003, 2016, Oracle and/or its affiliates.
+ Copyright (c) 2009, 2016, MariaDB
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
@@ -1755,38 +1755,39 @@ mysql_get_ssl_cipher(MYSQL *mysql __attribute__((unused)))
static int ssl_verify_server_cert(Vio *vio, const char* server_hostname, const char **errptr)
{
SSL *ssl;
- X509 *server_cert;
- X509_NAME *x509sn;
- int cn_pos;
- X509_NAME_ENTRY *cn_entry;
- ASN1_STRING *cn_asn1;
- const char *cn_str;
+ X509 *server_cert= NULL;
+ char *cn= NULL;
+ int cn_loc= -1;
+ ASN1_STRING *cn_asn1= NULL;
+ X509_NAME_ENTRY *cn_entry= NULL;
+ X509_NAME *subject= NULL;
+ int ret_validation= 1;
+
DBUG_ENTER("ssl_verify_server_cert");
DBUG_PRINT("enter", ("server_hostname: %s", server_hostname));
if (!(ssl= (SSL*)vio->ssl_arg))
{
*errptr= "No SSL pointer found";
- DBUG_RETURN(1);
+ goto error;
}
if (!server_hostname)
{
*errptr= "No server hostname supplied";
- DBUG_RETURN(1);
+ goto error;
}
if (!(server_cert= SSL_get_peer_certificate(ssl)))
{
*errptr= "Could not get server certificate";
- DBUG_RETURN(1);
+ goto error;
}
if (X509_V_OK != SSL_get_verify_result(ssl))
{
*errptr= "Failed to verify the server certificate";
- X509_free(server_cert);
- DBUG_RETURN(1);
+ goto error;
}
/*
We already know that the certificate exchanged was valid; the SSL library
@@ -1794,33 +1795,57 @@ static int ssl_verify_server_cert(Vio *vio, const char* server_hostname, const c
are what we expect.
*/
- x509sn= X509_get_subject_name(server_cert);
-
- if ((cn_pos= X509_NAME_get_index_by_NID(x509sn, NID_commonName, -1)) < 0)
- goto err;
+ /*
+ Some notes for future development
+ We should check host name in alternative name first and then if needed check in common name.
+ Currently yssl doesn't support alternative name.
+ openssl 1.0.2 support X509_check_host method for host name validation, we may need to start using
+ X509_check_host in the future.
+ */
- if (!(cn_entry= X509_NAME_get_entry(x509sn, cn_pos)))
- goto err;
+ subject= X509_get_subject_name(server_cert);
+ cn_loc= X509_NAME_get_index_by_NID(subject, NID_commonName, -1);
+ if (cn_loc < 0)
+ {
+ *errptr= "Failed to get CN location in the certificate subject";
+ goto error;
+ }
- if (!(cn_asn1 = X509_NAME_ENTRY_get_data(cn_entry)))
- goto err;
+ cn_entry= X509_NAME_get_entry(subject, cn_loc);
+ if (cn_entry == NULL)
+ {
+ *errptr= "Failed to get CN entry using CN location";
+ goto error;
+ }
- cn_str = (char *)ASN1_STRING_data(cn_asn1);
+ cn_asn1 = X509_NAME_ENTRY_get_data(cn_entry);
+ if (cn_asn1 == NULL)
+ {
+ *errptr= "Failed to get CN from CN entry";
+ goto error;
+ }
- /* Make sure there is no embedded \0 in the CN */
- if ((size_t)ASN1_STRING_length(cn_asn1) != strlen(cn_str))
- goto err;
+ cn= (char *) ASN1_STRING_data(cn_asn1);
- if (strcmp(cn_str, server_hostname))
- goto err;
+ if ((size_t)ASN1_STRING_length(cn_asn1) != strlen(cn))
+ {
+ *errptr= "NULL embedded in the certificate CN";
+ goto error;
+ }
- X509_free (server_cert);
- DBUG_RETURN(0);
+ DBUG_PRINT("info", ("Server hostname in cert: %s", cn));
+ if (!strcmp(cn, server_hostname))
+ {
+ /* Success */
+ ret_validation= 0;
+ }
-err:
- X509_free(server_cert);
*errptr= "SSL certificate validation failure";
- DBUG_RETURN(1);
+
+error:
+ if (server_cert != NULL)
+ X509_free (server_cert);
+ DBUG_RETURN(ret_validation);
}
#endif /* HAVE_OPENSSL */
@@ -4338,6 +4363,7 @@ mysql_options(MYSQL *mysql,enum mysql_option option, const void *arg)
stacksize= ASYNC_CONTEXT_DEFAULT_STACK_SIZE;
if (my_context_init(&ctxt->async_context, stacksize))
{
+ set_mysql_error(mysql, CR_OUT_OF_MEMORY, unknown_sqlstate);
my_free(ctxt);
DBUG_RETURN(1);
}
diff --git a/sql/authors.h b/sql/authors.h
index cc9889bcdbc..3a8f5497248 100644
--- a/sql/authors.h
+++ b/sql/authors.h
@@ -56,7 +56,7 @@ struct show_table_authors_st show_table_authors[]= {
"Unicode and character sets" },
{ "Alexey Botchkov (Holyfoot)", "Izhevsk, Russia",
"GIS extensions, embedded server, precision math"},
- { "Daniel Bartholomew", "Raleigh, USA", "MariaDB documentation"},
+ { "Daniel Bartholomew", "Raleigh, USA", "MariaDB documentation, Buildbot, releases"},
{ "Colin Charles", "Selangor, Malesia", "MariaDB documentation, talks at a LOT of conferences"},
{ "Sergey Vojtovich", "Izhevsk, Russia",
"initial implementation of plugin architecture, maintained native storage engines (MyISAM, MEMORY, ARCHIVE, etc), rewrite of table cache"},
@@ -73,6 +73,8 @@ struct show_table_authors_st show_table_authors[]= {
{ "Pavel Ivanov", "USA", "Some patches and bug fixes"},
{ "Konstantin Osipov", "Moscow, Russia",
"Prepared statements (4.1), Cursors (5.0), GET_LOCK (10.0)" },
+ { "Ian Gilfillan", "South Africa", "MariaDB documentation"},
+ { "Federico Razolli", "Italy", "MariaDB documentation Italian translation"},
/* People working on MySQL code base (not NDB) */
{ "Guilhem Bichot", "Bordeaux, France", "Replication (since 4.0)" },
diff --git a/sql/client_settings.h b/sql/client_settings.h
index d6a157f71fd..f2ad1797b8e 100644
--- a/sql/client_settings.h
+++ b/sql/client_settings.h
@@ -37,7 +37,7 @@
CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA | \
CLIENT_CONNECT_ATTRS)
-#define read_user_name(A) {}
+#define read_user_name(A) A[0]= 0
#undef _CUSTOMCONFIG_
#define mysql_server_init(a,b,c) mysql_client_plugin_init()
diff --git a/sql/contributors.h b/sql/contributors.h
index 2479f611727..255decd19cc 100644
--- a/sql/contributors.h
+++ b/sql/contributors.h
@@ -37,18 +37,16 @@ struct show_table_contributors_st {
struct show_table_contributors_st show_table_contributors[]= {
/* MariaDB foundation members, in contribution, size , time order */
- {"Booking.com", "http://www.booking.com", "Founding member of the MariaDB foundation"},
- {"SkySQL Ab", "http://www.skysql.com", "Founding member of the MariaDB foundation"},
- {"Auttomatic", "http://automattic.com", "Member of the MariaDB foundation"},
- {"Parallels", "http://www.parallels.com/products/plesk", "Founding member of the MariaDB foundation"},
+ {"Booking.com", "http://www.booking.com", "Founding member of the MariaDB Foundation"},
+ {"MariaDB Corporation", "https://mariadb.com", "Founding member of the MariaDB Foundation"},
+ {"Auttomattic", "http://automattic.com", "Member of the MariaDB Foundation"},
+ {"Parallels", "http://www.parallels.com/products/plesk", "Founding member of the MariaDB Foundation"},
+ {"Acronis", "http://www.acronis.com", "Member of the MariaDB Foundation"},
/* Smaller sponsors, newer per year */
- {"Verkkokauppa.com", "Finland", "Sponsor of the MariaDB foundation"},
- {"Webyog", "Bangalor", "Sponsor of the MariaDB foundation"},
- {"Percona", "USA", "Sponsor of the MariaDB foundation"},
- {"Jelastic.com", "Russia", "Sponsor of the MariaDB foundation"},
- {"Planetta.net", "Finland", "Sponsor of the MariaDB foundation"},
- {"Open query", "Australia", "Sponsor of the MariaDB foundation"},
+ {"Verkkokauppa.com", "Finland", "Sponsor of the MariaDB Foundation"},
+ {"Webyog", "Bangalore", "Sponsor of the MariaDB Foundation"},
+ {"Wikimedia Foundation", "USA", "Sponsor of the MariaDB Foundation"},
/* Sponsors of important features */
{"Google", "USA", "Sponsoring parallel replication and GTID" },
diff --git a/sql/events.cc b/sql/events.cc
index e23dcd21954..41f6aac5d64 100644
--- a/sql/events.cc
+++ b/sql/events.cc
@@ -907,10 +907,7 @@ end:
if (res)
deinit();
if (!had_thd)
- {
delete thd;
- set_current_thd(0);
- }
DBUG_RETURN(res);
}
diff --git a/sql/field.cc b/sql/field.cc
index 582926cb563..b356b126c16 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -7316,6 +7316,35 @@ uint32 Field_blob::get_length(const uchar *pos, uint packlength_arg)
}
+/**
+ Copy a value from another BLOB field of the same character set.
+ This method is used by Copy_field, e.g. during ALTER TABLE.
+*/
+int Field_blob::copy_value(Field_blob *from)
+{
+ DBUG_ASSERT(field_charset == from->charset());
+ int rc= 0;
+ uint32 length= from->get_length();
+ uchar *data;
+ from->get_ptr(&data);
+ if (packlength < from->packlength)
+ {
+ int well_formed_errors;
+ set_if_smaller(length, Field_blob::max_data_length());
+ length= field_charset->cset->well_formed_len(field_charset,
+ (const char *) data,
+ (const char *) data + length,
+ length, &well_formed_errors);
+ rc= report_if_important_data((const char *) data + length,
+ (const char *) data + from->get_length(),
+ true);
+ }
+ store_length(length);
+ bmove(ptr + packlength, (uchar*) &data, sizeof(char*));
+ return rc;
+}
+
+
int Field_blob::store(const char *from,uint length,CHARSET_INFO *cs)
{
ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
diff --git a/sql/field.h b/sql/field.h
index c64d6bc443c..81b16606e8b 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -283,6 +283,13 @@ public:
{
in_partitioning_expr= TRUE;
}
+ bool is_equal(Virtual_column_info* vcol)
+ {
+ return field_type == vcol->get_real_type()
+ && stored_in_db == vcol->is_stored()
+ && expr_str.length == vcol->expr_str.length
+ && memcmp(expr_str.str, vcol->expr_str.str, expr_str.length) == 0;
+ }
};
class Field
@@ -2550,6 +2557,7 @@ public:
{
set_ptr_offset(0, length, data);
}
+ int copy_value(Field_blob *from);
uint get_key_image(uchar *buff,uint length, imagetype type);
void set_key_image(const uchar *buff,uint length);
Field *new_key_field(MEM_ROOT *root, TABLE *new_table,
diff --git a/sql/field_conv.cc b/sql/field_conv.cc
index 79d579b6828..5006266eaed 100644
--- a/sql/field_conv.cc
+++ b/sql/field_conv.cc
@@ -1,6 +1,5 @@
-/*
- Copyright (c) 2000, 2015, Oracle and/or its affiliates.
- Copyright (c) 2010, 2015, MariaDB
+/* Copyright (c) 2000, 2016, Oracle and/or its affiliates.
+ Copyright (c) 2010, 2016, MariaDB
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
@@ -333,9 +332,7 @@ static void do_copy_next_number(Copy_field *copy)
static void do_copy_blob(Copy_field *copy)
{
- ulong length=((Field_blob*) copy->from_field)->get_length();
- ((Field_blob*) copy->to_field)->store_length(length);
- memcpy(copy->to_ptr, copy->from_ptr, sizeof(char*));
+ ((Field_blob*) copy->to_field)->copy_value(((Field_blob*) copy->from_field));
}
static void do_conv_blob(Copy_field *copy)
@@ -710,12 +707,7 @@ Copy_field::get_copy_func(Field *to,Field *from)
if (!(from->flags & BLOB_FLAG) || from->charset() != to->charset())
return do_conv_blob;
if (from_length != to_length)
- {
- // Correct pointer to point at char pointer
- to_ptr+= to_length - portable_sizeof_char_ptr;
- from_ptr+= from_length - portable_sizeof_char_ptr;
return do_copy_blob;
- }
}
else
{
@@ -905,7 +897,12 @@ int field_conv_incompatible(Field *to, Field *from)
Field_blob *blob=(Field_blob*) to;
from->val_str(&blob->value);
- if (!blob->value.is_alloced() && from->is_updatable())
+ /*
+ Copy value if copy_blobs is set, or source is part of the table's
+ writeset.
+ */
+ if (to->table->copy_blobs ||
+ (!blob->value.is_alloced() && from->is_updatable()))
blob->value.copy();
return blob->store(blob->value.ptr(),blob->value.length(),from->charset());
diff --git a/sql/gcalc_slicescan.cc b/sql/gcalc_slicescan.cc
index 251869cad03..c5db5053fb9 100644
--- a/sql/gcalc_slicescan.cc
+++ b/sql/gcalc_slicescan.cc
@@ -49,14 +49,14 @@ typedef int (*sc_compare_func)(const void*, const void*);
static Gcalc_scan_iterator::point *eq_sp(const Gcalc_heap::Info *pi)
{
GCALC_DBUG_ASSERT(pi->type == Gcalc_heap::nt_eq_node);
- return (Gcalc_scan_iterator::point *) pi->eq_data;
+ return (Gcalc_scan_iterator::point *) pi->node.eq.data;
}
static Gcalc_scan_iterator::intersection_info *i_data(const Gcalc_heap::Info *pi)
{
GCALC_DBUG_ASSERT(pi->type == Gcalc_heap::nt_intersection);
- return (Gcalc_scan_iterator::intersection_info *) pi->intersection_data;
+ return (Gcalc_scan_iterator::intersection_info *) pi->node.intersection.data;
}
@@ -103,8 +103,8 @@ const char *gcalc_ev_name(int ev)
static int gcalc_pi_str(char *str, const Gcalc_heap::Info *pi, const char *postfix)
{
return sprintf(str, "%s %d %d | %s %d %d%s",
- GCALC_SIGN(pi->ix[0]) ? "-":"", FIRST_DIGIT(pi->ix[0]),pi->ix[1],
- GCALC_SIGN(pi->iy[0]) ? "-":"", FIRST_DIGIT(pi->iy[0]),pi->iy[1],
+ GCALC_SIGN(pi->node.shape.ix[0]) ? "-":"", FIRST_DIGIT(pi->node.shape.ix[0]),pi->node.shape.ix[1],
+ GCALC_SIGN(pi->node.shape.iy[0]) ? "-":"", FIRST_DIGIT(pi->node.shape.iy[0]),pi->node.shape.iy[1],
postfix);
}
@@ -594,8 +594,8 @@ void Gcalc_scan_iterator::intersection_info::do_calc_t()
Gcalc_coord1 a2_a1x, a2_a1y;
Gcalc_coord2 x1y2, x2y1;
- gcalc_sub_coord1(a2_a1x, edge_b->pi->ix, edge_a->pi->ix);
- gcalc_sub_coord1(a2_a1y, edge_b->pi->iy, edge_a->pi->iy);
+ gcalc_sub_coord1(a2_a1x, edge_b->pi->node.shape.ix, edge_a->pi->node.shape.ix);
+ gcalc_sub_coord1(a2_a1y, edge_b->pi->node.shape.iy, edge_a->pi->node.shape.iy);
GCALC_DBUG_ASSERT(!gcalc_is_zero(edge_a->dy, GCALC_COORD_BASE) ||
!gcalc_is_zero(edge_b->dy, GCALC_COORD_BASE));
@@ -619,7 +619,7 @@ void Gcalc_scan_iterator::intersection_info::do_calc_y()
Gcalc_coord3 a_tb, b_ta;
gcalc_mul_coord(a_tb, GCALC_COORD_BASE3,
- t_b, GCALC_COORD_BASE2, edge_a->pi->iy, GCALC_COORD_BASE);
+ t_b, GCALC_COORD_BASE2, edge_a->pi->node.shape.iy, GCALC_COORD_BASE);
gcalc_mul_coord(b_ta, GCALC_COORD_BASE3,
t_a, GCALC_COORD_BASE2, edge_a->dy, GCALC_COORD_BASE);
@@ -635,7 +635,7 @@ void Gcalc_scan_iterator::intersection_info::do_calc_x()
Gcalc_coord3 a_tb, b_ta;
gcalc_mul_coord(a_tb, GCALC_COORD_BASE3,
- t_b, GCALC_COORD_BASE2, edge_a->pi->ix, GCALC_COORD_BASE);
+ t_b, GCALC_COORD_BASE2, edge_a->pi->node.shape.ix, GCALC_COORD_BASE);
gcalc_mul_coord(b_ta, GCALC_COORD_BASE3,
t_a, GCALC_COORD_BASE2, edge_a->dx, GCALC_COORD_BASE);
@@ -656,7 +656,7 @@ static int cmp_node_isc(const Gcalc_heap::Info *node,
inf->calc_y_exp();
gcalc_mul_coord(exp, GCALC_COORD_BASE3,
- inf->t_b, GCALC_COORD_BASE2, node->iy, GCALC_COORD_BASE);
+ inf->t_b, GCALC_COORD_BASE2, node->node.shape.iy, GCALC_COORD_BASE);
result= gcalc_cmp_coord(exp, inf->y_exp, GCALC_COORD_BASE3);
#ifdef GCALC_CHECK_WITH_FLOAT
@@ -664,18 +664,18 @@ static int cmp_node_isc(const Gcalc_heap::Info *node,
isc->calc_xy_ld(&int_x, &int_y);
if (result < 0)
{
- if (!de_check(int_y, node->y) && node->y > int_y)
- GCALC_DBUG_PRINT(("floatcheck cmp_nod_iscy %g < %LG", node->y, int_y));
+ if (!de_check(int_y, node->node.shape.y) && node->node.shape.y > int_y)
+ GCALC_DBUG_PRINT(("floatcheck cmp_nod_iscy %g < %LG", node->node.shape.y, int_y));
}
else if (result > 0)
{
- if (!de_check(int_y, node->y) && node->y < int_y)
- GCALC_DBUG_PRINT(("floatcheck cmp_nod_iscy %g > %LG", node->y, int_y));
+ if (!de_check(int_y, node->node.shape.y) && node->node.shape.y < int_y)
+ GCALC_DBUG_PRINT(("floatcheck cmp_nod_iscy %g > %LG", node->node.shape.y, int_y));
}
else
{
- if (!de_check(int_y, node->y))
- GCALC_DBUG_PRINT(("floatcheck cmp_nod_iscy %g == %LG", node->y, int_y));
+ if (!de_check(int_y, node->node.shape.y))
+ GCALC_DBUG_PRINT(("floatcheck cmp_nod_iscy %g == %LG", node->node.shape.y, int_y));
}
#endif /*GCALC_CHECK_WITH_FLOAT*/
if (result)
@@ -684,27 +684,27 @@ static int cmp_node_isc(const Gcalc_heap::Info *node,
inf->calc_x_exp();
gcalc_mul_coord(exp, GCALC_COORD_BASE3,
- inf->t_b, GCALC_COORD_BASE2, node->ix, GCALC_COORD_BASE);
+ inf->t_b, GCALC_COORD_BASE2, node->node.shape.ix, GCALC_COORD_BASE);
result= gcalc_cmp_coord(exp, inf->x_exp, GCALC_COORD_BASE3);
#ifdef GCALC_CHECK_WITH_FLOAT
if (result < 0)
{
- if (!de_check(int_x, node->x) && node->x > int_x)
+ if (!de_check(int_x, node->node.shape.x) && node->node.shape.x > int_x)
GCALC_DBUG_PRINT(("floatcheck cmp_nod_iscx failed %g < %LG",
- node->x, int_x));
+ node->node.shape.x, int_x));
}
else if (result > 0)
{
- if (!de_check(int_x, node->x) && node->x < int_x)
+ if (!de_check(int_x, node->node.shape.x) && node->node.shape.x < int_x)
GCALC_DBUG_PRINT(("floatcheck cmp_nod_iscx failed %g > %LG",
- node->x, int_x));
+ node->node.shape.x, int_x));
}
else
{
- if (!de_check(int_x, node->x))
+ if (!de_check(int_x, node->node.shape.x))
GCALC_DBUG_PRINT(("floatcheck cmp_nod_iscx failed %g == %LG",
- node->x, int_x));
+ node->node.shape.x, int_x));
}
#endif /*GCALC_CHECK_WITH_FLOAT*/
exit:
@@ -844,13 +844,13 @@ Gcalc_heap::Info *Gcalc_heap::new_point_info(double x, double y,
return NULL;
*m_hook= result;
m_hook= &result->next;
- result->x= x;
- result->y= y;
- result->shape= shape;
- result->top_node= 1;
+ result->node.shape.x= x;
+ result->node.shape.y= y;
+ result->node.shape.shape= shape;
+ result->node.shape.top_node= 1;
result->type= nt_shape_node;
- gcalc_set_double(result->ix, x, coord_extent);
- gcalc_set_double(result->iy, y, coord_extent);
+ gcalc_set_double(result->node.shape.ix, x, coord_extent);
+ gcalc_set_double(result->node.shape.iy, y, coord_extent);
m_n_points++;
return result;
@@ -864,11 +864,11 @@ static Gcalc_heap::Info *new_intersection(
if (!isc)
return 0;
isc->type= Gcalc_heap::nt_intersection;
- isc->p1= ii->edge_a->pi;
- isc->p2= ii->edge_a->next_pi;
- isc->p3= ii->edge_b->pi;
- isc->p4= ii->edge_b->next_pi;
- isc->intersection_data= ii;
+ isc->node.intersection.p1= ii->edge_a->pi;
+ isc->node.intersection.p2= ii->edge_a->next_pi;
+ isc->node.intersection.p3= ii->edge_b->pi;
+ isc->node.intersection.p4= ii->edge_b->next_pi;
+ isc->node.intersection.data= ii;
return isc;
}
@@ -881,46 +881,46 @@ static Gcalc_heap::Info *new_eq_point(
if (!eqp)
return 0;
eqp->type= Gcalc_heap::nt_eq_node;
- eqp->node= p;
- eqp->eq_data= edge;
+ eqp->node.eq.node= p;
+ eqp->node.eq.data= edge;
return eqp;
}
void Gcalc_heap::Info::calc_xy(double *x, double *y) const
{
- double b0_x= p2->x - p1->x;
- double b0_y= p2->y - p1->y;
- double b1_x= p4->x - p3->x;
- double b1_y= p4->y - p3->y;
+ double b0_x= node.intersection.p2->node.shape.x - node.intersection.p1->node.shape.x;
+ double b0_y= node.intersection.p2->node.shape.y - node.intersection.p1->node.shape.y;
+ double b1_x= node.intersection.p4->node.shape.x - node.intersection.p3->node.shape.x;
+ double b1_y= node.intersection.p4->node.shape.y - node.intersection.p3->node.shape.y;
double b0xb1= b0_x * b1_y - b0_y * b1_x;
- double t= (p3->x - p1->x) * b1_y - (p3->y - p1->y) * b1_x;
+ double t= (node.intersection.p3->node.shape.x - node.intersection.p1->node.shape.x) * b1_y - (node.intersection.p3->node.shape.y - node.intersection.p1->node.shape.y) * b1_x;
t/= b0xb1;
- *x= p1->x + b0_x * t;
- *y= p1->y + b0_y * t;
+ *x= node.intersection.p1->node.shape.x + b0_x * t;
+ *y= node.intersection.p1->node.shape.y + b0_y * t;
}
#ifdef GCALC_CHECK_WITH_FLOAT
void Gcalc_heap::Info::calc_xy_ld(long double *x, long double *y) const
{
- long double b0_x= ((long double) p2->x) - p1->x;
- long double b0_y= ((long double) p2->y) - p1->y;
- long double b1_x= ((long double) p4->x) - p3->x;
- long double b1_y= ((long double) p4->y) - p3->y;
+ long double b0_x= ((long double) p2->node.shape.x) - p1->node.shape.x;
+ long double b0_y= ((long double) p2->node.shape.y) - p1->node.shape.y;
+ long double b1_x= ((long double) p4->node.shape.x) - p3->node.shape.x;
+ long double b1_y= ((long double) p4->node.shape.y) - p3->node.shape.y;
long double b0xb1= b0_x * b1_y - b0_y * b1_x;
- long double ax= ((long double) p3->x) - p1->x;
- long double ay= ((long double) p3->y) - p1->y;
+ long double ax= ((long double) p3->node.shape.x) - p1->node.shape.x;
+ long double ay= ((long double) p3->node.shape.y) - p1->node.shape.y;
long double t_a= ax * b1_y - ay * b1_x;
- long double hx= (b0xb1 * (long double) p1->x + b0_x * t_a);
- long double hy= (b0xb1 * (long double) p1->y + b0_y * t_a);
+ long double hx= (b0xb1 * (long double) p1->node.shape.x + b0_x * t_a);
+ long double hy= (b0xb1 * (long double) p1->node.shape.y + b0_y * t_a);
if (fabs(b0xb1) < 1e-15)
{
- *x= p1->x;
- *y= p1->y;
+ *x= p1->node.shape.x;
+ *y= p1->node.shape.y;
return;
}
@@ -933,10 +933,10 @@ void Gcalc_heap::Info::calc_xy_ld(long double *x, long double *y) const
static int cmp_point_info(const Gcalc_heap::Info *i0,
const Gcalc_heap::Info *i1)
{
- int cmp_y= gcalc_cmp_coord1(i0->iy, i1->iy);
+ int cmp_y= gcalc_cmp_coord1(i0->node.shape.iy, i1->node.shape.iy);
if (cmp_y)
return cmp_y;
- return gcalc_cmp_coord1(i0->ix, i1->ix);
+ return gcalc_cmp_coord1(i0->node.shape.ix, i1->node.shape.ix);
}
@@ -944,11 +944,11 @@ static inline void trim_node(Gcalc_heap::Info *node, Gcalc_heap::Info *prev_node
{
if (!node)
return;
- node->top_node= 0;
- GCALC_DBUG_ASSERT((node->left == prev_node) || (node->right == prev_node));
- if (node->left == prev_node)
- node->left= node->right;
- node->right= NULL;
+ node->node.shape.top_node= 0;
+ GCALC_DBUG_ASSERT((node->node.shape.left == prev_node) || (node->node.shape.right == prev_node));
+ if (node->node.shape.left == prev_node)
+ node->node.shape.left= node->node.shape.right;
+ node->node.shape.right= NULL;
GCALC_DBUG_ASSERT(cmp_point_info(node, prev_node));
}
@@ -972,8 +972,8 @@ void Gcalc_heap::prepare_operation()
/* TODO - move this to the 'normal_scan' loop */
for (cur= get_first(); cur; cur= cur->get_next())
{
- trim_node(cur->left, cur);
- trim_node(cur->right, cur);
+ trim_node(cur->node.shape.left, cur);
+ trim_node(cur->node.shape.right, cur);
}
}
@@ -995,7 +995,7 @@ int Gcalc_shape_transporter::int_single_point(gcalc_shape_info Info,
Gcalc_heap::Info *point= m_heap->new_point_info(x, y, Info);
if (!point)
return 1;
- point->left= point->right= 0;
+ point->node.shape.left= point->node.shape.right= 0;
return 0;
}
@@ -1018,9 +1018,9 @@ int Gcalc_shape_transporter::int_add_point(gcalc_shape_info Info,
m_heap->free_point_info(point, hook);
return 0;
}
- GCALC_DBUG_ASSERT(!m_prev || m_prev->x != x || m_prev->y != y);
- m_prev->left= point;
- point->right= m_prev;
+ GCALC_DBUG_ASSERT(!m_prev || m_prev->node.shape.x != x || m_prev->node.shape.y != y);
+ m_prev->node.shape.left= point;
+ point->node.shape.right= m_prev;
}
else
m_first= point;
@@ -1040,16 +1040,16 @@ void Gcalc_shape_transporter::int_complete()
/* simple point */
if (m_first == m_prev)
{
- m_first->right= m_first->left= NULL;
+ m_first->node.shape.right= m_first->node.shape.left= NULL;
return;
}
/* line */
if (m_shape_started == 1)
{
- m_first->right= NULL;
- m_prev->left= m_prev->right;
- m_prev->right= NULL;
+ m_first->node.shape.right= NULL;
+ m_prev->node.shape.left= m_prev->node.shape.right;
+ m_prev->node.shape.right= NULL;
return;
}
@@ -1057,32 +1057,32 @@ void Gcalc_shape_transporter::int_complete()
if (cmp_point_info(m_first, m_prev) == 0)
{
/* Coinciding points, remove the last one from the list */
- m_prev->right->left= m_first;
- m_first->right= m_prev->right;
+ m_prev->node.shape.right->node.shape.left= m_first;
+ m_first->node.shape.right= m_prev->node.shape.right;
m_heap->free_point_info(m_prev, m_prev_hook);
}
else
{
- GCALC_DBUG_ASSERT(m_prev->x != m_first->x || m_prev->y != m_first->y);
- m_first->right= m_prev;
- m_prev->left= m_first;
+ GCALC_DBUG_ASSERT(m_prev->node.shape.x != m_first->node.shape.x || m_prev->node.shape.y != m_first->node.shape.y);
+ m_first->node.shape.right= m_prev;
+ m_prev->node.shape.left= m_first;
}
}
inline void calc_dx_dy(Gcalc_scan_iterator::point *p)
{
- gcalc_sub_coord1(p->dx, p->next_pi->ix, p->pi->ix);
- gcalc_sub_coord1(p->dy, p->next_pi->iy, p->pi->iy);
+ gcalc_sub_coord1(p->dx, p->next_pi->node.shape.ix, p->pi->node.shape.ix);
+ gcalc_sub_coord1(p->dy, p->next_pi->node.shape.iy, p->pi->node.shape.iy);
if (GCALC_SIGN(p->dx[0]))
{
- p->l_border= &p->next_pi->ix;
- p->r_border= &p->pi->ix;
+ p->l_border= &p->next_pi->node.shape.ix;
+ p->r_border= &p->pi->node.shape.ix;
}
else
{
- p->r_border= &p->next_pi->ix;
- p->l_border= &p->pi->ix;
+ p->r_border= &p->next_pi->node.shape.ix;
+ p->l_border= &p->pi->node.shape.ix;
}
}
@@ -1143,10 +1143,10 @@ int Gcalc_scan_iterator::point::cmp_dx_dy(const Gcalc_heap::Info *p1,
const Gcalc_heap::Info *p4)
{
Gcalc_coord1 dx_a, dy_a, dx_b, dy_b;
- gcalc_sub_coord1(dx_a, p2->ix, p1->ix);
- gcalc_sub_coord1(dy_a, p2->iy, p1->iy);
- gcalc_sub_coord1(dx_b, p4->ix, p3->ix);
- gcalc_sub_coord1(dy_b, p4->iy, p3->iy);
+ gcalc_sub_coord1(dx_a, p2->node.shape.ix, p1->node.shape.ix);
+ gcalc_sub_coord1(dy_a, p2->node.shape.iy, p1->node.shape.iy);
+ gcalc_sub_coord1(dx_b, p4->node.shape.ix, p3->node.shape.ix);
+ gcalc_sub_coord1(dy_b, p4->node.shape.iy, p3->node.shape.iy);
return cmp_dx_dy(dx_a, dy_a, dx_b, dy_b);
}
@@ -1168,8 +1168,8 @@ void Gcalc_scan_iterator::point::calc_x(long double *x, long double y,
*x= ix;
}
else
- *x= (ddy * (long double) pi->x + gcalc_get_double(dx, GCALC_COORD_BASE) *
- (y - pi->y)) / ddy;
+ *x= (ddy * (long double) pi->node.shape.x + gcalc_get_double(dx, GCALC_COORD_BASE) *
+ (y - pi->node.shape.y)) / ddy;
}
#endif /*GCALC_CHECK_WITH_FLOAT*/
@@ -1280,7 +1280,7 @@ int Gcalc_scan_iterator::arrange_event(int do_sorting, int n_intersections)
int Gcalc_heap::Info::equal_pi(const Info *pi) const
{
if (type == nt_intersection)
- return equal_intersection;
+ return node.intersection.equal;
if (pi->type == nt_eq_node)
return 1;
if (type == nt_eq_node || pi->type == nt_intersection)
@@ -1322,7 +1322,7 @@ int Gcalc_scan_iterator::step()
#ifndef GCALC_DBUG_OFF
if (m_cur_pi->type == Gcalc_heap::nt_intersection &&
m_cur_pi->get_next()->type == Gcalc_heap::nt_intersection &&
- m_cur_pi->equal_intersection)
+ m_cur_pi->node.intersection.equal)
GCALC_DBUG_ASSERT(cmp_intersections(m_cur_pi, m_cur_pi->get_next()) == 0);
#endif /*GCALC_DBUG_OFF*/
GCALC_DBUG_CHECK_COUNTER();
@@ -1377,23 +1377,23 @@ static int node_on_right(const Gcalc_heap::Info *node,
Gcalc_coord2 ax_by, ay_bx;
int result;
- gcalc_sub_coord1(a_x, node->ix, edge_a->ix);
- gcalc_sub_coord1(a_y, node->iy, edge_a->iy);
- gcalc_sub_coord1(b_x, edge_b->ix, edge_a->ix);
- gcalc_sub_coord1(b_y, edge_b->iy, edge_a->iy);
+ gcalc_sub_coord1(a_x, node->node.shape.ix, edge_a->node.shape.ix);
+ gcalc_sub_coord1(a_y, node->node.shape.iy, edge_a->node.shape.iy);
+ gcalc_sub_coord1(b_x, edge_b->node.shape.ix, edge_a->node.shape.ix);
+ gcalc_sub_coord1(b_y, edge_b->node.shape.iy, edge_a->node.shape.iy);
gcalc_mul_coord1(ax_by, a_x, b_y);
gcalc_mul_coord1(ay_bx, a_y, b_x);
result= gcalc_cmp_coord(ax_by, ay_bx, GCALC_COORD_BASE2);
#ifdef GCALC_CHECK_WITH_FLOAT
{
- long double dx= gcalc_get_double(edge_b->ix, GCALC_COORD_BASE) -
- gcalc_get_double(edge_a->ix, GCALC_COORD_BASE);
- long double dy= gcalc_get_double(edge_b->iy, GCALC_COORD_BASE) -
- gcalc_get_double(edge_a->iy, GCALC_COORD_BASE);
- long double ax= gcalc_get_double(node->ix, GCALC_COORD_BASE) -
- gcalc_get_double(edge_a->ix, GCALC_COORD_BASE);
- long double ay= gcalc_get_double(node->iy, GCALC_COORD_BASE) -
- gcalc_get_double(edge_a->iy, GCALC_COORD_BASE);
+ long double dx= gcalc_get_double(edge_b->node.shape.ix, GCALC_COORD_BASE) -
+ gcalc_get_double(edge_a->node.shape.ix, GCALC_COORD_BASE);
+ long double dy= gcalc_get_double(edge_b->node.shape.iy, GCALC_COORD_BASE) -
+ gcalc_get_double(edge_a->node.shape.iy, GCALC_COORD_BASE);
+ long double ax= gcalc_get_double(node->node.shape.ix, GCALC_COORD_BASE) -
+ gcalc_get_double(edge_a->node.shape.ix, GCALC_COORD_BASE);
+ long double ay= gcalc_get_double(node->node.shape.iy, GCALC_COORD_BASE) -
+ gcalc_get_double(edge_a->node.shape.iy, GCALC_COORD_BASE);
long double d= ax * dy - ay * dx;
if (result == 0)
GCALC_DBUG_ASSERT(de_check(d, 0.0));
@@ -1412,8 +1412,8 @@ static int cmp_tops(const Gcalc_heap::Info *top_node,
{
int cmp_res_a, cmp_res_b;
- cmp_res_a= gcalc_cmp_coord1(edge_a->ix, top_node->ix);
- cmp_res_b= gcalc_cmp_coord1(edge_b->ix, top_node->ix);
+ cmp_res_a= gcalc_cmp_coord1(edge_a->node.shape.ix, top_node->node.shape.ix);
+ cmp_res_b= gcalc_cmp_coord1(edge_b->node.shape.ix, top_node->node.shape.ix);
if (cmp_res_a <= 0 && cmp_res_b > 0)
return -1;
@@ -1438,26 +1438,26 @@ int Gcalc_scan_iterator::insert_top_node()
if (!sp0)
GCALC_DBUG_RETURN(1);
sp0->pi= m_cur_pi;
- sp0->next_pi= m_cur_pi->left;
+ sp0->next_pi= m_cur_pi->node.shape.left;
#ifndef GCALC_DBUG_OFF
sp0->thread= m_cur_thread++;
#endif /*GCALC_DBUG_OFF*/
- if (m_cur_pi->left)
+ if (m_cur_pi->node.shape.left)
{
calc_dx_dy(sp0);
- if (m_cur_pi->right)
+ if (m_cur_pi->node.shape.right)
{
if (!(sp1= new_slice_point()))
GCALC_DBUG_RETURN(1);
sp1->event= sp0->event= scev_two_threads;
sp1->pi= m_cur_pi;
- sp1->next_pi= m_cur_pi->right;
+ sp1->next_pi= m_cur_pi->node.shape.right;
#ifndef GCALC_DBUG_OFF
sp1->thread= m_cur_thread++;
#endif /*GCALC_DBUG_OFF*/
calc_dx_dy(sp1);
/* We have two threads so should decide which one will be first */
- cmp_res= cmp_tops(m_cur_pi, m_cur_pi->left, m_cur_pi->right);
+ cmp_res= cmp_tops(m_cur_pi, m_cur_pi->node.shape.left, m_cur_pi->node.shape.right);
if (cmp_res > 0)
{
point *tmp= sp0;
@@ -1467,7 +1467,7 @@ int Gcalc_scan_iterator::insert_top_node()
else if (cmp_res == 0)
{
/* Exactly same direction of the edges. */
- cmp_res= gcalc_cmp_coord1(m_cur_pi->left->iy, m_cur_pi->right->iy);
+ cmp_res= gcalc_cmp_coord1(m_cur_pi->node.shape.left->node.shape.iy, m_cur_pi->node.shape.right->node.shape.iy);
if (cmp_res != 0)
{
if (cmp_res < 0)
@@ -1483,7 +1483,7 @@ int Gcalc_scan_iterator::insert_top_node()
}
else
{
- cmp_res= gcalc_cmp_coord1(m_cur_pi->left->ix, m_cur_pi->right->ix);
+ cmp_res= gcalc_cmp_coord1(m_cur_pi->node.shape.left->node.shape.ix, m_cur_pi->node.shape.right->node.shape.ix);
if (cmp_res != 0)
{
if (cmp_res < 0)
@@ -1517,7 +1517,7 @@ int Gcalc_scan_iterator::insert_top_node()
/* We need to find the place to insert. */
for (; sp; prev_hook= sp->next_ptr(), sp=sp->get_next())
{
- if (sp->event || gcalc_cmp_coord1(*sp->r_border, m_cur_pi->ix) < 0)
+ if (sp->event || gcalc_cmp_coord1(*sp->r_border, m_cur_pi->node.shape.ix) < 0)
continue;
cmp_res= node_on_right(m_cur_pi, sp->pi, sp->next_pi);
if (cmp_res == 0)
@@ -1743,7 +1743,7 @@ int Gcalc_scan_iterator::node_scan()
GCALC_DBUG_PRINT(("node for %d", sp->thread));
/* Handle the point itself. */
sp->pi= cur_pi;
- sp->next_pi= cur_pi->left;
+ sp->next_pi= cur_pi->node.shape.left;
sp->event= scev_point;
calc_dx_dy(sp);
@@ -1794,7 +1794,7 @@ void Gcalc_scan_iterator::intersection_scan()
ii->edge_a->event= ii->edge_b->event= scev_intersection;
ii->edge_a->ev_pi= ii->edge_b->ev_pi= m_cur_pi;
free_item(ii);
- m_cur_pi->intersection_data= NULL;
+ m_cur_pi->node.intersection.data= NULL;
GCALC_DBUG_VOID_RETURN;
}
@@ -1813,7 +1813,7 @@ int Gcalc_scan_iterator::add_intersection(point *sp_a, point *sp_b,
!(ii= new_intersection(m_heap, i_calc)))
GCALC_DBUG_RETURN(1);
- ii->equal_intersection= 0;
+ ii->node.intersection.equal= 0;
for (;
pi_from->get_next() != sp_a->next_pi &&
@@ -1824,7 +1824,7 @@ int Gcalc_scan_iterator::add_intersection(point *sp_a, point *sp_b,
if (skip_next)
{
if (cur->type == Gcalc_heap::nt_intersection)
- skip_next= cur->equal_intersection;
+ skip_next= cur->node.intersection.equal;
else
skip_next= 0;
continue;
@@ -1832,7 +1832,7 @@ int Gcalc_scan_iterator::add_intersection(point *sp_a, point *sp_b,
if (cur->type == Gcalc_heap::nt_intersection)
{
cmp_res= cmp_intersections(cur, ii);
- skip_next= cur->equal_intersection;
+ skip_next= cur->node.intersection.equal;
}
else if (cur->type == Gcalc_heap::nt_eq_node)
continue;
@@ -1840,7 +1840,7 @@ int Gcalc_scan_iterator::add_intersection(point *sp_a, point *sp_b,
cmp_res= cmp_node_isc(cur, ii);
if (cmp_res == 0)
{
- ii->equal_intersection= 1;
+ ii->node.intersection.equal= 1;
break;
}
else if (cmp_res > 0)
@@ -1881,13 +1881,13 @@ void calc_t(Gcalc_coord2 t_a, Gcalc_coord2 t_b,
Gcalc_coord2 x1y2, x2y1;
Gcalc_coord1 dya, dyb;
- gcalc_sub_coord1(a2_a1x, p3->ix, p1->ix);
- gcalc_sub_coord1(a2_a1y, p3->iy, p1->iy);
+ gcalc_sub_coord1(a2_a1x, p3->node.shape.ix, p1->node.shape.ix);
+ gcalc_sub_coord1(a2_a1y, p3->node.shape.iy, p1->node.shape.iy);
- gcalc_sub_coord1(dxa, p2->ix, p1->ix);
- gcalc_sub_coord1(dya, p2->iy, p1->iy);
- gcalc_sub_coord1(dxb, p4->ix, p3->ix);
- gcalc_sub_coord1(dyb, p4->iy, p3->iy);
+ gcalc_sub_coord1(dxa, p2->node.shape.ix, p1->node.shape.ix);
+ gcalc_sub_coord1(dya, p2->node.shape.iy, p1->node.shape.iy);
+ gcalc_sub_coord1(dxb, p4->node.shape.ix, p3->node.shape.ix);
+ gcalc_sub_coord1(dyb, p4->node.shape.iy, p3->node.shape.iy);
gcalc_mul_coord1(x1y2, dxa, dyb);
gcalc_mul_coord1(x2y1, dya, dxb);
@@ -1908,11 +1908,11 @@ double Gcalc_scan_iterator::get_y() const
Gcalc_coord2 t_a, t_b;
Gcalc_coord3 a_tb, b_ta, y_exp;
calc_t(t_a, t_b, dxa, dya,
- state.pi->p1, state.pi->p2, state.pi->p3, state.pi->p4);
+ state.pi->node.intersection.p1, state.pi->node.intersection.p2, state.pi->node.intersection.p3, state.pi->node.intersection.p4);
gcalc_mul_coord(a_tb, GCALC_COORD_BASE3,
- t_b, GCALC_COORD_BASE2, state.pi->p1->iy, GCALC_COORD_BASE);
+ t_b, GCALC_COORD_BASE2, state.pi->node.intersection.p1->node.shape.iy, GCALC_COORD_BASE);
gcalc_mul_coord(b_ta, GCALC_COORD_BASE3,
t_a, GCALC_COORD_BASE2, dya, GCALC_COORD_BASE);
@@ -1922,7 +1922,7 @@ double Gcalc_scan_iterator::get_y() const
get_pure_double(t_b, GCALC_COORD_BASE2)) / m_heap->coord_extent;
}
else
- return state.pi->y;
+ return state.pi->node.shape.y;
}
@@ -1934,11 +1934,11 @@ double Gcalc_scan_iterator::get_event_x() const
Gcalc_coord2 t_a, t_b;
Gcalc_coord3 a_tb, b_ta, x_exp;
calc_t(t_a, t_b, dxa, dya,
- state.pi->p1, state.pi->p2, state.pi->p3, state.pi->p4);
+ state.pi->node.intersection.p1, state.pi->node.intersection.p2, state.pi->node.intersection.p3, state.pi->node.intersection.p4);
gcalc_mul_coord(a_tb, GCALC_COORD_BASE3,
- t_b, GCALC_COORD_BASE2, state.pi->p1->ix, GCALC_COORD_BASE);
+ t_b, GCALC_COORD_BASE2, state.pi->node.intersection.p1->node.shape.ix, GCALC_COORD_BASE);
gcalc_mul_coord(b_ta, GCALC_COORD_BASE3,
t_a, GCALC_COORD_BASE2, dxa, GCALC_COORD_BASE);
@@ -1948,7 +1948,7 @@ double Gcalc_scan_iterator::get_event_x() const
get_pure_double(t_b, GCALC_COORD_BASE2)) / m_heap->coord_extent;
}
else
- return state.pi->x;
+ return state.pi->node.shape.x;
}
double Gcalc_scan_iterator::get_h() const
@@ -1961,7 +1961,7 @@ double Gcalc_scan_iterator::get_h() const
state.pi->calc_xy(&x, &next_y);
}
else
- next_y= state.pi->y;
+ next_y= state.pi->node.shape.y;
return next_y - cur_y;
}
@@ -1970,11 +1970,11 @@ double Gcalc_scan_iterator::get_sp_x(const point *sp) const
{
double dy;
if (sp->event & (scev_end | scev_two_ends | scev_point))
- return sp->pi->x;
- dy= sp->next_pi->y - sp->pi->y;
+ return sp->pi->node.shape.x;
+ dy= sp->next_pi->node.shape.y - sp->pi->node.shape.y;
if (fabs(dy) < 1e-12)
- return sp->pi->x;
- return (sp->next_pi->x - sp->pi->x) * dy;
+ return sp->pi->node.shape.x;
+ return (sp->next_pi->node.shape.x - sp->pi->node.shape.x) * dy;
}
diff --git a/sql/gcalc_slicescan.h b/sql/gcalc_slicescan.h
index 55de497f1ee..5a0399bc8da 100644
--- a/sql/gcalc_slicescan.h
+++ b/sql/gcalc_slicescan.h
@@ -188,7 +188,7 @@ public:
double x,y;
Gcalc_coord1 ix, iy;
int top_node;
- };
+ } shape;
struct
{
/* nt_intersection */
@@ -197,21 +197,21 @@ public:
const Info *p2;
const Info *p3;
const Info *p4;
- void *intersection_data;
- int equal_intersection;
- };
+ void *data;
+ int equal;
+ } intersection;
struct
{
/* nt_eq_node */
const Info *node;
- void *eq_data;
- };
- };
+ void *data;
+ } eq;
+ } node;
bool is_bottom() const
- { GCALC_DBUG_ASSERT(type == nt_shape_node); return !left; }
+ { GCALC_DBUG_ASSERT(type == nt_shape_node); return !node.shape.left; }
bool is_top() const
- { GCALC_DBUG_ASSERT(type == nt_shape_node); return top_node; }
+ { GCALC_DBUG_ASSERT(type == nt_shape_node); return node.shape.top_node; }
bool is_single_node() const
{ return is_bottom() && is_top(); }
@@ -383,7 +383,7 @@ public:
inline const point *c_get_next() const
{ return (const point *)next; }
inline bool is_bottom() const { return !next_pi; }
- gcalc_shape_info get_shape() const { return pi->shape; }
+ gcalc_shape_info get_shape() const { return pi->node.shape.shape; }
inline point *get_next() { return (point *)next; }
inline const point *get_next() const { return (const point *)next; }
/* Compare the dx_dy parameters regarding the horiz_dir */
diff --git a/sql/gcalc_tools.cc b/sql/gcalc_tools.cc
index 864437401b7..f3c24f9bdf3 100644
--- a/sql/gcalc_tools.cc
+++ b/sql/gcalc_tools.cc
@@ -1243,7 +1243,7 @@ inline int Gcalc_operation_reducer::get_single_result(res_point *res,
GCALC_DBUG_RETURN(1);
}
else
- if (storage->single_point(res->pi->x, res->pi->y))
+ if (storage->single_point(res->pi->node.shape.x, res->pi->node.shape.y))
GCALC_DBUG_RETURN(1);
free_result(res);
GCALC_DBUG_RETURN(0);
@@ -1269,8 +1269,8 @@ int Gcalc_operation_reducer::get_result_thread(res_point *cur,
}
else
{
- x= cur->pi->x;
- y= cur->pi->y;
+ x= cur->pi->node.shape.x;
+ y= cur->pi->node.shape.y;
}
if (storage->add_point(x, y))
GCALC_DBUG_RETURN(1);
diff --git a/sql/handler.cc b/sql/handler.cc
index a7beb6fe9ed..f3b908ceb1e 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -4306,7 +4306,7 @@ handler::check_if_supported_inplace_alter(TABLE *altered_table,
IS_EQUAL_PACK_LENGTH : IS_EQUAL_YES;
if (table->file->check_if_incompatible_data(create_info, table_changes)
== COMPATIBLE_DATA_YES)
- DBUG_RETURN(HA_ALTER_INPLACE_EXCLUSIVE_LOCK);
+ DBUG_RETURN(HA_ALTER_INPLACE_NO_LOCK);
DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED);
}
diff --git a/sql/item.cc b/sql/item.cc
index af6915d7468..bed8824f68f 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -1,6 +1,6 @@
/*
Copyright (c) 2000, 2014, Oracle and/or its affiliates.
- Copyright (c) 2010, 2015, MariaDB
+ Copyright (c) 2010, 2016, MariaDB
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
diff --git a/sql/item.h b/sql/item.h
index 5b7c0e815b4..4347bdb6c07 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -2,7 +2,7 @@
#define SQL_ITEM_INCLUDED
/* Copyright (c) 2000, 2015, Oracle and/or its affiliates.
- Copyright (c) 2009, 2015, MariaDB
+ Copyright (c) 2009, 2016, MariaDB
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
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index c763103a767..b2c580db507 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates.
- Copyright (c) 2009, 2015, MariaDB
+ Copyright (c) 2009, 2016, MariaDB
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
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h
index 73f428752f8..d109e412f0c 100644
--- a/sql/item_cmpfunc.h
+++ b/sql/item_cmpfunc.h
@@ -1,7 +1,7 @@
#ifndef ITEM_CMPFUNC_INCLUDED
#define ITEM_CMPFUNC_INCLUDED
/* Copyright (c) 2000, 2015, Oracle and/or its affiliates.
- Copyright (c) 2009, 2015, MariaDB
+ Copyright (c) 2009, 2016, MariaDB
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
diff --git a/sql/item_geofunc.cc b/sql/item_geofunc.cc
index 124c9ce6b72..1d3dbaf9eeb 100644
--- a/sql/item_geofunc.cc
+++ b/sql/item_geofunc.cc
@@ -637,10 +637,10 @@ static double count_edge_t(const Gcalc_heap::Info *ea,
double &ex, double &ey, double &vx, double &vy,
double &e_sqrlen)
{
- ex= eb->x - ea->x;
- ey= eb->y - ea->y;
- vx= v->x - ea->x;
- vy= v->y - ea->y;
+ ex= eb->node.shape.x - ea->node.shape.x;
+ ey= eb->node.shape.y - ea->node.shape.y;
+ vx= v->node.shape.x - ea->node.shape.x;
+ vy= v->node.shape.y - ea->node.shape.y;
e_sqrlen= ex * ex + ey * ey;
return (ex * vx + ey * vy) / e_sqrlen;
}
@@ -656,8 +656,8 @@ static double distance_to_line(double ex, double ey, double vx, double vy,
static double distance_points(const Gcalc_heap::Info *a,
const Gcalc_heap::Info *b)
{
- double x= a->x - b->x;
- double y= a->y - b->y;
+ double x= a->node.shape.x - b->node.shape.x;
+ double y= a->node.shape.y - b->node.shape.y;
return sqrt(x * x + y * y);
}
@@ -1698,7 +1698,7 @@ double Item_func_distance::val_real()
continue;
count_distance:
- if (cur_point->shape >= obj2_si)
+ if (cur_point->node.shape.shape >= obj2_si)
continue;
cur_point_edge= !cur_point->is_bottom();
@@ -1706,13 +1706,13 @@ count_distance:
{
/* We only check vertices of object 2 */
if (dist_point->type != Gcalc_heap::nt_shape_node ||
- dist_point->shape < obj2_si)
+ dist_point->node.shape.shape < obj2_si)
continue;
/* if we have an edge to check */
- if (dist_point->left)
+ if (dist_point->node.shape.left)
{
- t= count_edge_t(dist_point, dist_point->left, cur_point,
+ t= count_edge_t(dist_point, dist_point->node.shape.left, cur_point,
ex, ey, vx, vy, e_sqrlen);
if ((t>0.0) && (t<1.0))
{
@@ -1723,7 +1723,7 @@ count_distance:
}
if (cur_point_edge)
{
- t= count_edge_t(cur_point, cur_point->left, dist_point,
+ t= count_edge_t(cur_point, cur_point->node.shape.left, dist_point,
ex, ey, vx, vy, e_sqrlen);
if ((t>0.0) && (t<1.0))
{
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc
index 54ab8f6aca1..3b8bc1580bb 100644
--- a/sql/item_strfunc.cc
+++ b/sql/item_strfunc.cc
@@ -1557,7 +1557,7 @@ String *Item_func_insert::val_str(String *str)
length= res->charpos((int) length, (uint32) start);
/* Re-testing with corrected params */
- if (start > res->length())
+ if (start + 1 > res->length()) // remember, start = args[1].val_int() - 1
return res; /* purecov: inspected */ // Wrong param; skip insert
if (length > res->length() - start)
length= res->length() - start;
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc
index fb55b7660cb..bf3a9981943 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -1,6 +1,6 @@
/*
Copyright (c) 2000, 2012, Oracle and/or its affiliates.
- Copyright (c) 2009, 2013, Monty Program Ab
+ Copyright (c) 2009, 2016, MariaDB
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
@@ -3000,7 +3000,7 @@ void Item_func_timestamp_diff::print(String *str, enum_query_type query_type)
str->append(STRING_WITH_LEN("SECOND"));
break;
case INTERVAL_MICROSECOND:
- str->append(STRING_WITH_LEN("SECOND_FRAC"));
+ str->append(STRING_WITH_LEN("MICROSECOND"));
break;
default:
break;
diff --git a/sql/log.cc b/sql/log.cc
index dcc210c7271..745b7747aab 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates.
- Copyright (c) 2009, 2015, MariaDB
+ Copyright (c) 2009, 2016, MariaDB
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
diff --git a/sql/log_event.cc b/sql/log_event.cc
index 1afa1475931..bffaa9ee554 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -1,6 +1,6 @@
/*
- Copyright (c) 2000, 2014, Oracle and/or its affiliates.
- Copyright (c) 2009, 2014, Monty Program Ab.
+ Copyright (c) 2000, 2015, Oracle and/or its affiliates.
+ Copyright (c) 2009, 2016, MariaDB
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
@@ -3419,7 +3419,7 @@ Query_log_event::Query_log_event(const char* buf, uint event_len,
slave_proxy_id= thread_id = uint4korr(buf + Q_THREAD_ID_OFFSET);
exec_time = uint4korr(buf + Q_EXEC_TIME_OFFSET);
- db_len = (uint)buf[Q_DB_LEN_OFFSET]; // TODO: add a check of all *_len vars
+ db_len = (uchar)buf[Q_DB_LEN_OFFSET]; // TODO: add a check of all *_len vars
error_code = uint2korr(buf + Q_ERR_CODE_OFFSET);
/*
@@ -11146,8 +11146,8 @@ bool Table_map_log_event::write_data_body(IO_CACHE *file)
DBUG_ASSERT(m_dbnam != NULL);
DBUG_ASSERT(m_tblnam != NULL);
/* We use only one byte per length for storage in event: */
- DBUG_ASSERT(m_dblen < 128);
- DBUG_ASSERT(m_tbllen < 128);
+ DBUG_ASSERT(m_dblen <= MY_MIN(NAME_LEN, 255));
+ DBUG_ASSERT(m_tbllen <= MY_MIN(NAME_LEN, 255));
uchar const dbuf[]= { (uchar) m_dblen };
uchar const tbuf[]= { (uchar) m_tbllen };
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 53e7a65c59c..0abb394f89f 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2015, Oracle and/or its affiliates.
- Copyright (c) 2008, 2015, MariaDB
+ Copyright (c) 2008, 2016, MariaDB
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
@@ -1516,7 +1516,6 @@ static openssl_lock_t *openssl_dynlock_create(const char *, int);
static void openssl_dynlock_destroy(openssl_lock_t *, const char *, int);
static void openssl_lock_function(int, int, const char *, int);
static void openssl_lock(int, openssl_lock_t *, const char *, int);
-static unsigned long openssl_id_function();
#endif
char *des_key_file;
#ifndef EMBEDDED_LIBRARY
@@ -4631,7 +4630,6 @@ static int init_thread_environment()
CRYPTO_set_dynlock_destroy_callback(openssl_dynlock_destroy);
CRYPTO_set_dynlock_lock_callback(openssl_lock);
CRYPTO_set_locking_callback(openssl_lock_function);
- CRYPTO_set_id_callback(openssl_id_function);
#endif
#endif
mysql_rwlock_init(key_rwlock_LOCK_sys_init_connect, &LOCK_sys_init_connect);
@@ -4689,12 +4687,6 @@ static int init_thread_environment()
#if defined(HAVE_OPENSSL) && !defined(HAVE_YASSL)
-static unsigned long openssl_id_function()
-{
- return (unsigned long) pthread_self();
-}
-
-
static openssl_lock_t *openssl_dynlock_create(const char *file, int line)
{
openssl_lock_t *lock= new openssl_lock_t;
@@ -7137,7 +7129,6 @@ void handle_connections_sockets()
(void) mysql_socket_close(new_sock);
}
delete thd;
- set_current_thd(0);
statistic_increment(connection_errors_internal, &LOCK_status);
continue;
}
@@ -7252,7 +7243,6 @@ pthread_handler_t handle_connections_namedpipes(void *arg)
{
close_connection(thd, ER_OUT_OF_RESOURCES);
delete thd;
- set_current_thd(0);
continue;
}
/* Host is unknown */
@@ -8093,8 +8083,8 @@ static int show_slave_running(THD *thd, SHOW_VAR *var, char *buff)
get_master_info(&thd->variables.default_master_connection,
Sql_condition::WARN_LEVEL_NOTE);
if (mi)
- tmp= (my_bool) (mi->slave_running == MYSQL_SLAVE_RUN_CONNECT &&
- mi->rli.slave_running);
+ tmp= (my_bool) (mi->slave_running == MYSQL_SLAVE_RUN_READING &&
+ mi->rli.slave_running != MYSQL_SLAVE_NOT_RUN);
}
mysql_mutex_unlock(&LOCK_active_mi);
if (mi)
@@ -8105,6 +8095,38 @@ static int show_slave_running(THD *thd, SHOW_VAR *var, char *buff)
}
+/* How many slaves are connected to this master */
+
+static int show_slaves_connected(THD *thd, SHOW_VAR *var, char *buff)
+{
+
+ var->type= SHOW_LONGLONG;
+ var->value= buff;
+ mysql_mutex_lock(&LOCK_slave_list);
+
+ *((longlong *)buff)= slave_list.records;
+
+ mysql_mutex_unlock(&LOCK_slave_list);
+ return 0;
+}
+
+
+/* How many masters this slave is connected to */
+
+
+static int show_slaves_running(THD *thd, SHOW_VAR *var, char *buff)
+{
+ var->type= SHOW_LONGLONG;
+ var->value= buff;
+ mysql_mutex_lock(&LOCK_active_mi);
+
+ *((longlong *)buff)= master_info_index->any_slave_sql_running();
+
+ mysql_mutex_unlock(&LOCK_active_mi);
+ return 0;
+}
+
+
static int show_slave_received_heartbeats(THD *thd, SHOW_VAR *var, char *buff)
{
Master_info *mi= NULL;
@@ -8756,6 +8778,9 @@ SHOW_VAR status_vars[]= {
{"Select_scan", (char*) offsetof(STATUS_VAR, select_scan_count_), SHOW_LONG_STATUS},
{"Slave_open_temp_tables", (char*) &slave_open_temp_tables, SHOW_INT},
#ifdef HAVE_REPLICATION
+ {"Slaves_connected", (char*) &show_slaves_connected, SHOW_SIMPLE_FUNC },
+ {"Slaves_running", (char*) &show_slaves_running, SHOW_SIMPLE_FUNC },
+ {"Slave_connections", (char*) offsetof(STATUS_VAR, com_register_slave), SHOW_LONG_STATUS},
{"Slave_heartbeat_period", (char*) &show_heartbeat_period, SHOW_SIMPLE_FUNC},
{"Slave_received_heartbeats",(char*) &show_slave_received_heartbeats, SHOW_SIMPLE_FUNC},
{"Slave_retried_transactions",(char*)&slave_retried_transactions, SHOW_LONG},
@@ -9051,7 +9076,7 @@ static int mysql_init_variables(void)
my_atomic_rwlock_init(&thread_count_lock);
my_atomic_rwlock_init(&statistics_lock);
my_atomic_rwlock_init(&slave_executed_entries_lock);
- strmov(server_version, MYSQL_SERVER_VERSION);
+ strnmov(server_version, MYSQL_SERVER_VERSION, sizeof(server_version)-1);
threads.empty();
thread_cache.empty();
key_caches.empty();
@@ -9929,20 +9954,23 @@ static int get_options(int *argc_ptr, char ***argv_ptr)
void set_server_version(void)
{
- char *end= strxmov(server_version, MYSQL_SERVER_VERSION,
- MYSQL_SERVER_SUFFIX_STR, NullS);
+ char *version_end= server_version+sizeof(server_version)-1;
+ char *end= strxnmov(server_version, sizeof(server_version)-1,
+ MYSQL_SERVER_VERSION,
+ MYSQL_SERVER_SUFFIX_STR, NullS);
#ifdef EMBEDDED_LIBRARY
- end= strmov(end, "-embedded");
+ end= strnmov(end, "-embedded", (version_end-end));
#endif
#ifdef WITH_WSREP
end= strmov(end, "-wsrep");
#endif
#ifndef DBUG_OFF
if (!strstr(MYSQL_SERVER_SUFFIX_STR, "-debug"))
- end= strmov(end, "-debug");
+ end= strnmov(end, "-debug", (version_end-end));
#endif
if (opt_log || opt_slow_log || opt_bin_log)
- strmov(end, "-log"); // This may slow down system
+ strnmov(end, "-log", (version_end-end)); // This may slow down system
+ *end= 0;
}
@@ -10240,7 +10268,7 @@ void refresh_status(THD *thd)
Set max_used_connections to the number of currently open
connections. This is not perfect, but status data is not exact anyway.
*/
- max_used_connections= thread_count-delayed_insert_threads;
+ max_used_connections= connection_count + extra_connection_count;
}
#ifdef HAVE_PSI_INTERFACE
diff --git a/sql/net_serv.cc b/sql/net_serv.cc
index 0ce0fa93f99..91a17606d68 100644
--- a/sql/net_serv.cc
+++ b/sql/net_serv.cc
@@ -34,6 +34,7 @@
HFTODO this must be hidden if we don't want client capabilities in
embedded library
*/
+
#include <my_global.h>
#include <mysql.h>
#include <mysql_com.h>
@@ -107,13 +108,12 @@ extern void query_cache_insert(const char *packet, ulong length,
unsigned pkt_nr);
#endif // HAVE_QUERY_CACHE
#define update_statistics(A) A
-#else
-#define update_statistics(A)
-#endif
-
-#ifdef MYSQL_SERVER
+extern my_bool thd_net_is_killed();
/* Additional instrumentation hooks for the server */
#include "mysql_com_server.h"
+#else
+#define update_statistics(A)
+#define thd_net_is_killed() 0
#endif
#define TEST_BLOCKING 8
@@ -875,6 +875,16 @@ my_real_read(NET *net, size_t *complen,
DBUG_PRINT("info",("vio_read returned %ld errno: %d",
(long) length, vio_errno(net->vio)));
+
+ if (i== 0 && thd_net_is_killed())
+ {
+ len= packet_error;
+ net->error= 0;
+ net->last_errno= ER_CONNECTION_KILLED;
+ MYSQL_SERVER_my_error(net->last_errno, MYF(0));
+ goto end;
+ }
+
#if !defined(__WIN__) && defined(MYSQL_SERVER)
/*
We got an error that there was no data on the socket. We now set up
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index 6b72f9c336b..f051ed07a7e 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -4931,15 +4931,14 @@ static bool create_partition_index_description(PART_PRUNE_PARAM *ppar)
Field **field= (ppar->part_fields)? part_info->part_field_array :
part_info->subpart_field_array;
bool in_subpart_fields= FALSE;
- uint max_key_len= 0;
- uint cur_key_len= 0;
+ uint total_key_len= 0;
for (uint part= 0; part < total_parts; part++, key_part++)
{
key_part->key= 0;
key_part->part= part;
key_part->length= (uint16)(*field)->key_length();
key_part->store_length= (uint16)get_partition_field_store_length(*field);
- cur_key_len += key_part->store_length;
+ total_key_len += key_part->store_length;
DBUG_PRINT("info", ("part %u length %u store_length %u", part,
key_part->length, key_part->store_length));
@@ -4965,18 +4964,13 @@ static bool create_partition_index_description(PART_PRUNE_PARAM *ppar)
{
field= part_info->subpart_field_array;
in_subpart_fields= TRUE;
- max_key_len= cur_key_len;
- cur_key_len= 0;
}
}
range_par->key_parts_end= key_part;
- if (cur_key_len > max_key_len)
- max_key_len= cur_key_len;
-
- max_key_len++; /* Take into account the "+1" in QUICK_RANGE::QUICK_RANGE */
- if (!(range_par->min_key= (uchar*)alloc_root(alloc,max_key_len)) ||
- !(range_par->max_key= (uchar*)alloc_root(alloc,max_key_len)))
+ total_key_len++; /* Take into account the "+1" in QUICK_RANGE::QUICK_RANGE */
+ if (!(range_par->min_key= (uchar*)alloc_root(alloc,total_key_len)) ||
+ !(range_par->max_key= (uchar*)alloc_root(alloc,total_key_len)))
{
return true;
}
diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc
index 3d470b6ff5c..de57143e61d 100644
--- a/sql/opt_subselect.cc
+++ b/sql/opt_subselect.cc
@@ -831,12 +831,14 @@ bool subquery_types_allow_materialization(Item_in_subselect *in_subs)
in_subs->sjm_scan_allowed= FALSE;
bool all_are_fields= TRUE;
+ uint32 total_key_length = 0;
for (uint i= 0; i < elements; i++)
{
Item *outer= in_subs->left_expr->element_index(i);
Item *inner= it++;
all_are_fields &= (outer->real_item()->type() == Item::FIELD_ITEM &&
inner->real_item()->type() == Item::FIELD_ITEM);
+ total_key_length += inner->max_length;
if (outer->cmp_type() != inner->cmp_type())
DBUG_RETURN(FALSE);
switch (outer->cmp_type()) {
@@ -867,6 +869,15 @@ bool subquery_types_allow_materialization(Item_in_subselect *in_subs)
}
}
+ /*
+ Make sure that create_tmp_table will not fail due to too long keys.
+ See MDEV-7122. This check is performed inside create_tmp_table also and
+ we must do it so that we know the table has keys created.
+ */
+ if (total_key_length > tmp_table_max_key_length() ||
+ elements > tmp_table_max_key_parts())
+ DBUG_RETURN(FALSE);
+
in_subs->types_allow_materialization= TRUE;
in_subs->sjm_scan_allowed= all_are_fields;
DBUG_PRINT("info",("subquery_types_allow_materialization: ok, allowed"));
@@ -5519,7 +5530,8 @@ bool JOIN::choose_subquery_plan(table_map join_tables)
outer join has not been optimized yet).
*/
if (outer_join && outer_join->table_count > 0 && // (1)
- outer_join->join_tab) // (2)
+ outer_join->join_tab && // (2)
+ !in_subs->const_item())
{
/*
TODO:
diff --git a/sql/rpl_mi.cc b/sql/rpl_mi.cc
index dfb7a1071c4..007f4c2828b 100644
--- a/sql/rpl_mi.cc
+++ b/sql/rpl_mi.cc
@@ -35,7 +35,8 @@ Master_info::Master_info(LEX_STRING *connection_name_arg,
rli(is_slave_recovery), port(MYSQL_PORT),
checksum_alg_before_fd(BINLOG_CHECKSUM_ALG_UNDEF),
connect_retry(DEFAULT_CONNECT_RETRY), inited(0), abort_slave(0),
- slave_running(0), slave_run_id(0), clock_diff_with_master(0),
+ slave_running(MYSQL_SLAVE_NOT_RUN), slave_run_id(0),
+ clock_diff_with_master(0),
sync_counter(0), heartbeat_period(0), received_heartbeats(0),
master_id(0), prev_master_id(0),
using_gtid(USE_GTID_NO), events_queued_since_last_gtid(0),
@@ -1280,23 +1281,24 @@ bool Master_info_index::give_error_if_slave_running()
The LOCK_active_mi must be held while calling this function.
@return
- TRUE If some slave SQL thread is running.
- FALSE No slave SQL thread is running
+ 0 No Slave SQL thread is running
+ # Number of slave SQL thread running
*/
-bool Master_info_index::any_slave_sql_running()
+uint Master_info_index::any_slave_sql_running()
{
+ uint count= 0;
DBUG_ENTER("any_slave_sql_running");
if (!this) // master_info_index is set to NULL on server shutdown
- DBUG_RETURN(TRUE);
+ DBUG_RETURN(count);
for (uint i= 0; i< master_info_hash.records; ++i)
{
Master_info *mi= (Master_info *)my_hash_element(&master_info_hash, i);
if (mi->rli.slave_running != MYSQL_SLAVE_NOT_RUN)
- DBUG_RETURN(TRUE);
+ count++;
}
- DBUG_RETURN(FALSE);
+ DBUG_RETURN(count);
}
@@ -1326,7 +1328,7 @@ bool Master_info_index::start_all_slaves(THD *thd)
Try to start all slaves that are configured (host is defined)
and are not already running
*/
- if ((mi->slave_running != MYSQL_SLAVE_RUN_CONNECT ||
+ if ((mi->slave_running == MYSQL_SLAVE_NOT_RUN ||
!mi->rli.slave_running) && *mi->host)
{
if ((error= start_slave(thd, mi, 1)))
diff --git a/sql/rpl_mi.h b/sql/rpl_mi.h
index 2b0b40feb3d..a27672e4c90 100644
--- a/sql/rpl_mi.h
+++ b/sql/rpl_mi.h
@@ -218,7 +218,7 @@ public:
Master_info *get_master_info(LEX_STRING *connection_name,
Sql_condition::enum_warning_level warning);
bool give_error_if_slave_running();
- bool any_slave_sql_running();
+ uint any_slave_sql_running();
bool start_all_slaves(THD *thd);
bool stop_all_slaves(THD *thd);
};
diff --git a/sql/rpl_reporting.cc b/sql/rpl_reporting.cc
index 49708df40f7..ad949402511 100644
--- a/sql/rpl_reporting.cc
+++ b/sql/rpl_reporting.cc
@@ -59,6 +59,7 @@ Slave_reporting_capability::report(loglevel level, int err_code,
report_function= sql_print_information;
break;
default:
+ va_end(args);
DBUG_ASSERT(0); // should not come here
return; // don't crash production builds, just do nothing
}
diff --git a/sql/rpl_rli.cc b/sql/rpl_rli.cc
index 8c7724d88a3..1fc92d4ecec 100644
--- a/sql/rpl_rli.cc
+++ b/sql/rpl_rli.cc
@@ -63,7 +63,7 @@ Relay_log_info::Relay_log_info(bool is_slave_recovery)
last_master_timestamp(0), sql_thread_caught_up(true), slave_skip_counter(0),
abort_pos_wait(0), slave_run_id(0), sql_driver_thd(),
gtid_skip_flag(GTID_SKIP_NOT), inited(0), abort_slave(0), stop_for_until(0),
- slave_running(0), until_condition(UNTIL_NONE),
+ slave_running(MYSQL_SLAVE_NOT_RUN), until_condition(UNTIL_NONE),
until_log_pos(0), retried_trans(0), executed_entries(0),
m_flags(0)
{
@@ -389,6 +389,7 @@ Failed to open the existing relay log info file '%s' (errno %d)",
if (rli->is_relay_log_recovery && init_recovery(rli->mi, &msg))
goto err;
+ rli->relay_log_state.load(rpl_global_gtid_slave_state);
if (init_relay_log_pos(rli,
rli->group_relay_log_name,
rli->group_relay_log_pos,
@@ -1148,6 +1149,7 @@ int purge_relay_logs(Relay_log_info* rli, THD *thd, bool just_reset,
error=1;
goto err;
}
+ rli->relay_log_state.load(rpl_global_gtid_slave_state);
if (!just_reset)
{
/* Save name of used relay log file */
diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt
index 5fed6b10425..4394e796a1a 100644
--- a/sql/share/errmsg-utf8.txt
+++ b/sql/share/errmsg-utf8.txt
@@ -7108,7 +7108,7 @@ ER_PRIOR_COMMIT_FAILED
ER_IT_IS_A_VIEW 42S02
eng "'%-.192s' is a view"
ER_SLAVE_SKIP_NOT_IN_GTID
- eng "When using GTID, @@sql_slave_skip_counter can not be used. Instead, setting @@gtid_slave_pos explicitly can be used to skip to after a given GTID position."
+ eng "When using parallel replication and GTID with multiple replication domains, @@sql_slave_skip_counter can not be used. Instead, setting @@gtid_slave_pos explicitly can be used to skip to after a given GTID position."
ER_TABLE_DEFINITION_TOO_BIG
eng "The definition for table %`s is too big"
ER_PLUGIN_INSTALLED
diff --git a/sql/slave.cc b/sql/slave.cc
index a385be1831e..625ae7b0b4b 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -115,7 +115,7 @@ static const char *reconnect_messages[SLAVE_RECON_ACT_MAX][SLAVE_RECON_MSG_MAX]=
{
{
"Waiting to reconnect after a failed registration on master",
- "Slave I/O thread killed while waitnig to reconnect after a failed \
+ "Slave I/O thread killed while waiting to reconnect after a failed \
registration on master",
"Reconnecting after a failed registration on master",
"failed registering on master, reconnecting to try again, \
@@ -2617,6 +2617,8 @@ static bool send_show_master_info_header(THD *thd, bool full,
DBUG_RETURN(FALSE);
}
+/* Text for Slave_IO_Running */
+static const char *slave_running[]= { "No", "Connecting", "Preparing", "Yes" };
static bool send_show_master_info_data(THD *thd, Master_info *mi, bool full,
String *gtid_pos)
@@ -2670,9 +2672,7 @@ static bool send_show_master_info_data(THD *thd, Master_info *mi, bool full,
&my_charset_bin);
protocol->store((ulonglong) mi->rli.group_relay_log_pos);
protocol->store(mi->rli.group_master_log_name, &my_charset_bin);
- protocol->store(mi->slave_running == MYSQL_SLAVE_RUN_CONNECT ?
- "Yes" : (mi->slave_running == MYSQL_SLAVE_RUN_NOT_CONNECT ?
- "Connecting" : "No"), &my_charset_bin);
+ protocol->store(slave_running[mi->slave_running], &my_charset_bin);
protocol->store(mi->rli.slave_running ? "Yes":"No", &my_charset_bin);
protocol->store(rpl_filter->get_do_db());
protocol->store(rpl_filter->get_ignore_db());
@@ -2715,7 +2715,7 @@ static bool send_show_master_info_data(THD *thd, Master_info *mi, bool full,
Seconds_Behind_Master: if SQL thread is running and I/O thread is
connected, we can compute it otherwise show NULL (i.e. unknown).
*/
- if ((mi->slave_running == MYSQL_SLAVE_RUN_CONNECT) &&
+ if ((mi->slave_running == MYSQL_SLAVE_RUN_READING) &&
mi->rli.slave_running)
{
long time_diff;
@@ -4069,10 +4069,9 @@ connected:
if (request_dump(thd, mysql, mi, &suppress_warnings))
{
sql_print_error("Failed on request_dump()");
- if (check_io_slave_killed(mi, "Slave I/O thread killed while \
-requesting master dump") ||
- try_to_reconnect(thd, mysql, mi, &retry_count, suppress_warnings,
- reconnect_messages[SLAVE_RECON_ACT_DUMP]))
+ if (check_io_slave_killed(mi, NullS) ||
+ try_to_reconnect(thd, mysql, mi, &retry_count, suppress_warnings,
+ reconnect_messages[SLAVE_RECON_ACT_DUMP]))
goto err;
goto connected;
}
@@ -4088,6 +4087,7 @@ requesting master dump") ||
});
const char *event_buf;
+ mi->slave_running= MYSQL_SLAVE_RUN_READING;
DBUG_ASSERT(mi->last_error().number == 0);
while (!io_slave_killed(mi))
{
@@ -4100,8 +4100,7 @@ requesting master dump") ||
*/
THD_STAGE_INFO(thd, stage_waiting_for_master_to_send_event);
event_len= read_event(mysql, mi, &suppress_warnings);
- if (check_io_slave_killed(mi, "Slave I/O thread killed while \
-reading event"))
+ if (check_io_slave_killed(mi, NullS))
goto err;
DBUG_EXECUTE_IF("FORCE_SLAVE_TO_RECONNECT_EVENT",
if (!retry_count_event)
@@ -4576,15 +4575,6 @@ pthread_handler_t handle_slave_sql(void *arg)
serial_rgi->gtid_sub_id= 0;
serial_rgi->gtid_pending= false;
- if (mi->using_gtid != Master_info::USE_GTID_NO)
- {
- /*
- We initialize the relay log state from the know starting position.
- It will then be updated as required by GTID and GTID_LIST events found
- while applying events read from relay logs.
- */
- rli->relay_log_state.load(rpl_global_gtid_slave_state);
- }
rli->gtid_skip_flag = GTID_SKIP_NOT;
if (init_relay_log_pos(rli,
rli->group_relay_log_name,
@@ -4862,6 +4852,7 @@ log '%s' at position %s, relay log '%s' position: %s%s", RPL_LOG_NAME,
}
strmake_buf(rli->group_relay_log_name, ir->name);
rli->group_relay_log_pos= BIN_LOG_HEADER_SIZE;
+ rli->relay_log_state.load(ir->relay_log_state, ir->relay_log_state_count);
}
}
}
diff --git a/sql/slave.h b/sql/slave.h
index e16f801b577..5cc02c8a10b 100644
--- a/sql/slave.h
+++ b/sql/slave.h
@@ -132,11 +132,11 @@ extern my_bool opt_replicate_annotate_row_events;
extern ulonglong relay_log_space_limit;
/*
- 3 possible values for Master_info::slave_running and
+ 4 possible values for Master_info::slave_running and
Relay_log_info::slave_running.
- The values 0,1,2 are very important: to keep the diff small, I didn't
- substitute places where we use 0/1 with the newly defined symbols. So don't change
- these values.
+ The values 0,1,2,3 are very important: to keep the diff small, I didn't
+ substitute places where we use 0/1 with the newly defined symbols.
+ So don't change these values.
The same way, code is assuming that in Relay_log_info we use only values
0/1.
I started with using an enum, but
@@ -145,6 +145,7 @@ extern ulonglong relay_log_space_limit;
#define MYSQL_SLAVE_NOT_RUN 0
#define MYSQL_SLAVE_RUN_NOT_CONNECT 1
#define MYSQL_SLAVE_RUN_CONNECT 2
+#define MYSQL_SLAVE_RUN_READING 3
#define RPL_LOG_NAME (rli->group_master_log_name[0] ? rli->group_master_log_name :\
"FIRST")
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 4bef15cef3f..e6fb4911f01 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -959,8 +959,6 @@ my_bool acl_init(bool dont_read_acl_tables)
*/
return_val= acl_reload(thd);
delete thd;
- /* Remember that we don't have a THD */
- set_current_thd(0);
DBUG_RETURN(return_val);
}
@@ -6411,8 +6409,6 @@ my_bool grant_init()
thd->store_globals();
return_val= grant_reload(thd);
delete thd;
- /* Remember that we don't have a THD */
- set_current_thd(0);
DBUG_RETURN(return_val);
}
diff --git a/sql/sql_admin.cc b/sql/sql_admin.cc
index 507840772f5..d32b213a838 100644
--- a/sql/sql_admin.cc
+++ b/sql/sql_admin.cc
@@ -1,5 +1,5 @@
-/* Copyright (c) 2010, 2014, Oracle and/or its affiliates.
- Copyright (c) 2012, 2015, MariaDB
+/* Copyright (c) 2010, 2015, Oracle and/or its affiliates.
+ Copyright (c) 2011, 2016, MariaDB
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
@@ -288,7 +288,8 @@ static inline bool table_not_corrupt_error(uint sql_errno)
sql_errno == ER_LOCK_WAIT_TIMEOUT ||
sql_errno == ER_LOCK_DEADLOCK ||
sql_errno == ER_CANT_LOCK_LOG_TABLE ||
- sql_errno == ER_OPEN_AS_READONLY);
+ sql_errno == ER_OPEN_AS_READONLY ||
+ sql_errno == ER_WRONG_OBJECT);
}
@@ -393,7 +394,13 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
lex->query_tables_last= &table->next_global;
lex->query_tables_own_last= 0;
- if (view_operator_func == NULL)
+ /*
+ CHECK TABLE command is allowed for views as well. Check on alter flags
+ to differentiate from ALTER TABLE...CHECK PARTITION on which view is not
+ allowed.
+ */
+ if (lex->alter_info.flags & Alter_info::ALTER_ADMIN_PARTITION ||
+ view_operator_func == NULL)
{
table->required_type=FRMTYPE_TABLE;
DBUG_ASSERT(!lex->only_view);
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 434830f1cf0..d71fc8a439e 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2015, Oracle and/or its affiliates.
- Copyright (c) 2010, 2015, MariaDB
+ Copyright (c) 2010, 2016, MariaDB
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
@@ -172,11 +172,6 @@ static bool check_and_update_table_version(THD *thd, TABLE_LIST *tables,
TABLE_SHARE *table_share);
static bool open_table_entry_fini(THD *thd, TABLE_SHARE *share, TABLE *entry);
static bool auto_repair_table(THD *thd, TABLE_LIST *table_list);
-static bool
-has_write_table_with_auto_increment(TABLE_LIST *tables);
-static bool
-has_write_table_with_auto_increment_and_select(TABLE_LIST *tables);
-static bool has_write_table_auto_increment_not_first_in_pk(TABLE_LIST *tables);
/**
@@ -2258,6 +2253,16 @@ bool open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root,
*/
if (dd_frm_is_view(thd, path))
{
+ /*
+ If parent_l of the table_list is non null then a merge table
+ has this view as child table, which is not supported.
+ */
+ if (table_list->parent_l)
+ {
+ my_error(ER_WRONG_MRG_TABLE, MYF(0));
+ DBUG_RETURN(true);
+ }
+
if (!tdc_open_view(thd, table_list, alias, key, key_length,
mem_root, CHECK_METADATA_VERSION))
{
@@ -5436,65 +5441,6 @@ bool lock_tables(THD *thd, TABLE_LIST *tables, uint count,
*(ptr++)= table->table;
}
- /*
- DML statements that modify a table with an auto_increment column based on
- rows selected from a table are unsafe as the order in which the rows are
- fetched fron the select tables cannot be determined and may differ on
- master and slave.
- */
- if (thd->variables.binlog_format != BINLOG_FORMAT_ROW && tables &&
- has_write_table_with_auto_increment_and_select(tables))
- thd->lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_WRITE_AUTOINC_SELECT);
- /* Todo: merge all has_write_table_auto_inc with decide_logging_format */
- if (thd->variables.binlog_format != BINLOG_FORMAT_ROW && tables)
- {
- if (has_write_table_auto_increment_not_first_in_pk(tables))
- thd->lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_AUTOINC_NOT_FIRST);
- }
-
-#ifdef NOT_USED_IN_MARIADB
- /*
- INSERT...ON DUPLICATE KEY UPDATE on a table with more than one unique keys
- can be unsafe.
- */
- uint unique_keys= 0;
- for (TABLE_LIST *query_table= tables; query_table && unique_keys <= 1;
- query_table= query_table->next_global)
- if(query_table->table)
- {
- uint keys= query_table->table->s->keys, i= 0;
- unique_keys= 0;
- for (KEY* keyinfo= query_table->table->s->key_info;
- i < keys && unique_keys <= 1; i++, keyinfo++)
- {
- if (keyinfo->flags & HA_NOSAME)
- unique_keys++;
- }
- if (!query_table->placeholder() &&
- query_table->lock_type >= TL_WRITE_ALLOW_WRITE &&
- unique_keys > 1 && thd->lex->sql_command == SQLCOM_INSERT &&
- /* Duplicate key update is not supported by INSERT DELAYED */
- thd->get_command() != COM_DELAYED_INSERT &&
- thd->lex->duplicates == DUP_UPDATE)
- thd->lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_INSERT_TWO_KEYS);
- }
-#endif
-
- /* We have to emulate LOCK TABLES if we are statement needs prelocking. */
- if (thd->lex->requires_prelocking())
- {
-
- /*
- A query that modifies autoinc column in sub-statement can make the
- master and slave inconsistent.
- We can solve these problems in mixed mode by switching to binlogging
- if at least one updated table is used by sub-statement
- */
- if (WSREP_FORMAT(thd->variables.binlog_format) != BINLOG_FORMAT_ROW && tables &&
- has_write_table_with_auto_increment(thd->lex->first_not_own_table()))
- thd->lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_AUTOINC_COLUMNS);
- }
-
DEBUG_SYNC(thd, "before_lock_tables_takes_lock");
if (! (thd->lock= mysql_lock_tables(thd, start, (uint) (ptr - start),
@@ -9089,7 +9035,6 @@ my_bool mysql_rm_tmp_tables(void)
my_dirend(dirp);
}
delete thd;
- set_current_thd(0);
DBUG_RETURN(0);
}
@@ -9288,98 +9233,6 @@ bool is_equal(const LEX_STRING *a, const LEX_STRING *b)
return a->length == b->length && !strncmp(a->str, b->str, a->length);
}
-
-/*
- Tells if two (or more) tables have auto_increment columns and we want to
- lock those tables with a write lock.
-
- SYNOPSIS
- has_two_write_locked_tables_with_auto_increment
- tables Table list
-
- NOTES:
- Call this function only when you have established the list of all tables
- which you'll want to update (including stored functions, triggers, views
- inside your statement).
-*/
-
-static bool
-has_write_table_with_auto_increment(TABLE_LIST *tables)
-{
- for (TABLE_LIST *table= tables; table; table= table->next_global)
- {
- /* we must do preliminary checks as table->table may be NULL */
- if (!table->placeholder() &&
- table->table->found_next_number_field &&
- (table->lock_type >= TL_WRITE_ALLOW_WRITE))
- return 1;
- }
-
- return 0;
-}
-
-/*
- checks if we have select tables in the table list and write tables
- with auto-increment column.
-
- SYNOPSIS
- has_two_write_locked_tables_with_auto_increment_and_select
- tables Table list
-
- RETURN VALUES
-
- -true if the table list has atleast one table with auto-increment column
-
-
- and atleast one table to select from.
- -false otherwise
-*/
-
-static bool
-has_write_table_with_auto_increment_and_select(TABLE_LIST *tables)
-{
- bool has_select= false;
- bool has_auto_increment_tables = has_write_table_with_auto_increment(tables);
- for(TABLE_LIST *table= tables; table; table= table->next_global)
- {
- if (!table->placeholder() &&
- (table->lock_type <= TL_READ_NO_INSERT))
- {
- has_select= true;
- break;
- }
- }
- return(has_select && has_auto_increment_tables);
-}
-
-/*
- Tells if there is a table whose auto_increment column is a part
- of a compound primary key while is not the first column in
- the table definition.
-
- @param tables Table list
-
- @return true if the table exists, fais if does not.
-*/
-
-static bool
-has_write_table_auto_increment_not_first_in_pk(TABLE_LIST *tables)
-{
- for (TABLE_LIST *table= tables; table; table= table->next_global)
- {
- /* we must do preliminary checks as table->table may be NULL */
- if (!table->placeholder() &&
- table->table->found_next_number_field &&
- (table->lock_type >= TL_WRITE_ALLOW_WRITE)
- && table->table->s->next_number_keypart != 0)
- return 1;
- }
-
- return 0;
-}
-
-
-
/*
Open and lock system tables for read.
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index fa26494f35b..205bce08a12 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -1,6 +1,6 @@
/*
Copyright (c) 2000, 2015, Oracle and/or its affiliates.
- Copyright (c) 2008, 2015, MariaDB
+ Copyright (c) 2008, 2016, MariaDB
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
@@ -1894,7 +1894,7 @@ THD::~THD()
DBUG_ASSERT(status_var.memory_used == 0); // Ensure everything is freed
}
- set_current_thd(orig_thd);
+ set_current_thd(orig_thd == this ? 0 : orig_thd);
DBUG_VOID_RETURN;
}
@@ -1992,7 +1992,8 @@ void add_diff_to_status(STATUS_VAR *to_var, STATUS_VAR *from_var,
void THD::awake(killed_state state_to_set)
{
DBUG_ENTER("THD::awake");
- DBUG_PRINT("enter", ("this: %p current_thd: %p", this, current_thd));
+ DBUG_PRINT("enter", ("this: %p current_thd: %p state: %d",
+ this, current_thd, (int) state_to_set));
THD_CHECK_SENTRY(this);
mysql_mutex_assert_owner(&LOCK_thd_data);
@@ -4081,6 +4082,12 @@ void thd_increment_bytes_sent(ulong length)
}
}
+my_bool thd_net_is_killed()
+{
+ THD *thd= current_thd;
+ return thd && thd->killed ? 1 : 0;
+}
+
void thd_increment_bytes_received(ulong length)
{
@@ -5370,6 +5377,94 @@ void xid_cache_delete(XID_STATE *xid_state)
mysql_mutex_unlock(&LOCK_xid_cache);
}
+/*
+ Tells if two (or more) tables have auto_increment columns and we want to
+ lock those tables with a write lock.
+
+ SYNOPSIS
+ has_two_write_locked_tables_with_auto_increment
+ tables Table list
+
+ NOTES:
+ Call this function only when you have established the list of all tables
+ which you'll want to update (including stored functions, triggers, views
+ inside your statement).
+*/
+
+static bool
+has_write_table_with_auto_increment(TABLE_LIST *tables)
+{
+ for (TABLE_LIST *table= tables; table; table= table->next_global)
+ {
+ /* we must do preliminary checks as table->table may be NULL */
+ if (!table->placeholder() &&
+ table->table->found_next_number_field &&
+ (table->lock_type >= TL_WRITE_ALLOW_WRITE))
+ return 1;
+ }
+
+ return 0;
+}
+
+/*
+ checks if we have select tables in the table list and write tables
+ with auto-increment column.
+
+ SYNOPSIS
+ has_two_write_locked_tables_with_auto_increment_and_select
+ tables Table list
+
+ RETURN VALUES
+
+ -true if the table list has atleast one table with auto-increment column
+
+
+ and atleast one table to select from.
+ -false otherwise
+*/
+
+static bool
+has_write_table_with_auto_increment_and_select(TABLE_LIST *tables)
+{
+ bool has_select= false;
+ bool has_auto_increment_tables = has_write_table_with_auto_increment(tables);
+ for(TABLE_LIST *table= tables; table; table= table->next_global)
+ {
+ if (!table->placeholder() &&
+ (table->lock_type <= TL_READ_NO_INSERT))
+ {
+ has_select= true;
+ break;
+ }
+ }
+ return(has_select && has_auto_increment_tables);
+}
+
+/*
+ Tells if there is a table whose auto_increment column is a part
+ of a compound primary key while is not the first column in
+ the table definition.
+
+ @param tables Table list
+
+ @return true if the table exists, fais if does not.
+*/
+
+static bool
+has_write_table_auto_increment_not_first_in_pk(TABLE_LIST *tables)
+{
+ for (TABLE_LIST *table= tables; table; table= table->next_global)
+ {
+ /* we must do preliminary checks as table->table may be NULL */
+ if (!table->placeholder() &&
+ table->table->found_next_number_field &&
+ (table->lock_type >= TL_WRITE_ALLOW_WRITE)
+ && table->table->s->next_number_keypart != 0)
+ return 1;
+ }
+
+ return 0;
+}
/**
Decide on logging format to use for the statement and issue errors
@@ -5554,6 +5649,31 @@ int THD::decide_logging_format(TABLE_LIST *tables)
}
#endif
+ if (variables.binlog_format != BINLOG_FORMAT_ROW && tables)
+ {
+ /*
+ DML statements that modify a table with an auto_increment column based on
+ rows selected from a table are unsafe as the order in which the rows are
+ fetched fron the select tables cannot be determined and may differ on
+ master and slave.
+ */
+ if (has_write_table_with_auto_increment_and_select(tables))
+ lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_WRITE_AUTOINC_SELECT);
+
+ if (has_write_table_auto_increment_not_first_in_pk(tables))
+ lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_AUTOINC_NOT_FIRST);
+
+ /*
+ A query that modifies autoinc column in sub-statement can make the
+ master and slave inconsistent.
+ We can solve these problems in mixed mode by switching to binlogging
+ if at least one updated table is used by sub-statement
+ */
+ if (lex->requires_prelocking() &&
+ has_write_table_with_auto_increment(lex->first_not_own_table()))
+ lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_AUTOINC_COLUMNS);
+ }
+
/*
Get the capabilities vector for all involved storage engines and
mask out the flags for the binary log.
diff --git a/sql/sql_class.h b/sql/sql_class.h
index aee4d1dc359..a2bbe0861d1 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -1,6 +1,6 @@
/*
Copyright (c) 2000, 2015, Oracle and/or its affiliates.
- Copyright (c) 2009, 2015, MariaDB
+ Copyright (c) 2009, 2016, MariaDB
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
@@ -676,6 +676,7 @@ typedef struct system_status_var
{
ulong com_other;
ulong com_stat[(uint) SQLCOM_END];
+ ulong com_register_slave;
ulong created_tmp_disk_tables_;
ulong created_tmp_tables_;
ulong ha_commit_count;
@@ -4242,10 +4243,14 @@ public:
#define TMP_ENGINE_COLUMNDEF MARIA_COLUMNDEF
#define TMP_ENGINE_HTON maria_hton
#define TMP_ENGINE_NAME "Aria"
+inline uint tmp_table_max_key_length() { return maria_max_key_length(); }
+inline uint tmp_table_max_key_parts() { return maria_max_key_segments(); }
#else
#define TMP_ENGINE_COLUMNDEF MI_COLUMNDEF
#define TMP_ENGINE_HTON myisam_hton
#define TMP_ENGINE_NAME "MyISAM"
+inline uint tmp_table_max_key_length() { return MI_MAX_KEY_LENGTH; }
+inline uint tmp_table_max_key_parts() { return MI_MAX_KEY_SEG; }
#endif
/*
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index ef4c4421df0..c4dc41f7626 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -4221,6 +4221,8 @@ select_create::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
DBUG_RETURN(1);
table->mark_columns_needed_for_insert();
table->file->extra(HA_EXTRA_WRITE_CACHE);
+ // Mark table as used
+ table->query_id= thd->query_id;
DBUG_RETURN(0);
}
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index 4aad94b8188..a0d15093558 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2014, Oracle and/or its affiliates.
- Copyright (c) 2009, 2015, MariaDB
+ Copyright (c) 2009, 2016, MariaDB
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
@@ -3885,6 +3885,19 @@ void SELECT_LEX::update_used_tables()
tl->on_expr->update_used_tables();
tl->on_expr->walk(&Item::eval_not_null_tables, 0, NULL);
}
+ /*
+ - There is no need to check sj_on_expr, because merged semi-joins inject
+ sj_on_expr into the parent's WHERE clase.
+ - For non-merged semi-joins (aka JTBMs), we need to check their
+ left_expr. There is no need to check the rest of the subselect, we know
+ it is uncorrelated and so cannot refer to any tables in this select.
+ */
+ if (tl->jtbm_subselect)
+ {
+ Item *left_expr= tl->jtbm_subselect->left_expr;
+ left_expr->walk(&Item::update_table_bitmaps_processor, FALSE, NULL);
+ }
+
embedding= tl->embedding;
while (embedding)
{
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index 413afdb4369..6ba384e93a0 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -1,5 +1,5 @@
-/* Copyright (c) 2000, 2014, Oracle and/or its affiliates.
- Copyright (c) 2010, 2015, MariaDB
+/* Copyright (c) 2000, 2015, Oracle and/or its affiliates.
+ Copyright (c) 2010, 2016, MariaDB
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
@@ -1012,6 +1012,13 @@ private:
index_clause_map current_index_hint_clause;
/* a list of USE/FORCE/IGNORE INDEX */
List<Index_hint> *index_hints;
+
+public:
+ inline void add_where_field(st_select_lex *sel)
+ {
+ DBUG_ASSERT(this != sel);
+ select_n_where_fields+= sel->select_n_where_fields;
+ }
};
typedef class st_select_lex SELECT_LEX;
@@ -1353,6 +1360,11 @@ public:
return get_stmt_unsafe_flags() != 0;
}
+ inline bool is_stmt_unsafe(enum_binlog_stmt_unsafe unsafe)
+ {
+ return binlog_stmt_flags & (1 << unsafe);
+ }
+
/**
Flag the current (top-level) statement as unsafe.
The flag will be reset after the statement has finished.
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index f20d578af1c..e8c80fed47c 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -1351,6 +1351,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
#ifdef HAVE_REPLICATION
case COM_REGISTER_SLAVE:
{
+ status_var_increment(thd->status_var.com_register_slave);
if (!register_slave(thd, (uchar*)packet, packet_length))
my_ok(thd);
break;
diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc
index c559e18501e..6d48ebbfaa8 100644
--- a/sql/sql_plugin.cc
+++ b/sql/sql_plugin.cc
@@ -1791,9 +1791,7 @@ static void plugin_load(MEM_ROOT *tmp_root)
table->m_needs_reopen= TRUE; // Force close to free memory
close_mysql_tables(new_thd);
end:
- /* Remember that we don't have a THD */
delete new_thd;
- set_current_thd(0);
DBUG_VOID_RETURN;
}
diff --git a/sql/sql_reload.cc b/sql/sql_reload.cc
index 597c38bed40..4629154de7d 100644
--- a/sql/sql_reload.cc
+++ b/sql/sql_reload.cc
@@ -99,8 +99,6 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options,
if (tmp_thd)
{
delete tmp_thd;
- /* Remember that we don't have a THD */
- set_current_thd(0);
thd= 0;
}
reset_mqh((LEX_USER *)NULL, TRUE);
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 18259a27bc7..514ba947172 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2015 Oracle and/or its affiliates.
- Copyright (c) 2009, 2015 MariaDB
+ Copyright (c) 2009, 2016 MariaDB
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
@@ -16853,6 +16853,12 @@ bool create_internal_tmp_table(TABLE *table, KEY *keyinfo,
goto err;
bzero(seg, sizeof(*seg) * keyinfo->user_defined_key_parts);
+ /*
+ Note that a similar check is performed during
+ subquery_types_allow_materialization. See MDEV-7122 for more details as
+ to why. Whenever this changes, it must be updated there as well, for
+ all tmp_table engines.
+ */
if (keyinfo->key_length > table->file->max_key_length() ||
keyinfo->user_defined_key_parts > table->file->max_key_parts() ||
share->uniques)
@@ -17026,6 +17032,12 @@ bool create_internal_tmp_table(TABLE *table, KEY *keyinfo,
goto err;
bzero(seg, sizeof(*seg) * keyinfo->user_defined_key_parts);
+ /*
+ Note that a similar check is performed during
+ subquery_types_allow_materialization. See MDEV-7122 for more details as
+ to why. Whenever this changes, it must be updated there as well, for
+ all tmp_table engines.
+ */
if (keyinfo->key_length > table->file->max_key_length() ||
keyinfo->user_defined_key_parts > table->file->max_key_parts() ||
share->uniques)
@@ -18471,7 +18483,18 @@ int join_read_key2(THD *thd, JOIN_TAB *tab, TABLE *table, TABLE_REF *table_ref)
}
}
+ /*
+ The following is needed when one makes ref (or eq_ref) access from row
+ comparisons: one must call row->bring_value() to get the new values.
+ */
+ if (tab && tab->bush_children)
+ {
+ TABLE_LIST *emb_sj_nest= tab->bush_children->start->emb_sj_nest;
+ emb_sj_nest->sj_subq_pred->left_expr->bring_value();
+ }
+
/* TODO: Why don't we do "Late NULLs Filtering" here? */
+
if (cmp_buffer_with_ref(thd, table, table_ref) ||
(table->status & (STATUS_GARBAGE | STATUS_NO_PARENT | STATUS_NULL_ROW)))
{
@@ -20813,7 +20836,7 @@ create_sort_index(THD *thd, JOIN *join, ORDER *order,
select, filesort_limit, 0,
&examined_rows, &found_rows);
table->sort.found_records= filesort_retval;
- tab->records= found_rows; // For SQL_CALC_ROWS
+ tab->records= join->select_options & OPTION_FOUND_ROWS ? found_rows : filesort_retval;
if (quick_created)
{
diff --git a/sql/sql_select.h b/sql/sql_select.h
index bbeb2aa6952..18a649bc47a 100644
--- a/sql/sql_select.h
+++ b/sql/sql_select.h
@@ -33,7 +33,6 @@
#include "records.h" /* READ_RECORD */
#include "opt_range.h" /* SQL_SELECT, QUICK_SELECT_I */
-
/* Values in optimize */
#define KEY_OPTIMIZE_EXISTS 1
#define KEY_OPTIMIZE_REF_OR_NULL 2
diff --git a/sql/sql_servers.cc b/sql/sql_servers.cc
index 8d5bb2b596d..78d11a6bebf 100644
--- a/sql/sql_servers.cc
+++ b/sql/sql_servers.cc
@@ -177,8 +177,6 @@ bool servers_init(bool dont_read_servers_table)
*/
return_val= servers_reload(thd);
delete thd;
- /* Remember that we don't have a THD */
- set_current_thd(0);
end:
DBUG_RETURN(return_val);
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 66c2682e9a3..aef73ccf205 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2015, Oracle and/or its affiliates.
- Copyright (c) 2009, 2015, MariaDB
+ Copyright (c) 2009, 2016, MariaDB
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
@@ -1292,20 +1292,17 @@ static const char *require_quotes(const char *name, uint name_length)
}
-/*
- Quote the given identifier if needed and append it to the target string.
- If the given identifier is empty, it will be quoted.
-
- SYNOPSIS
- append_identifier()
- thd thread handler
- packet target string
- name the identifier to be appended
- name_length length of the appending identifier
+/**
+ Convert and quote the given identifier if needed and append it to the
+ target string. If the given identifier is empty, it will be quoted.
+ @thd thread handler
+ @packet target string
+ @name the identifier to be appended
+ @length length of the appending identifier
- RETURN VALUES
- true Error
- false Ok
+ @return
+ 0 success
+ 1 error
*/
bool
diff --git a/sql/sql_show.h b/sql/sql_show.h
index f6078580db3..b66cd30c0ce 100644
--- a/sql/sql_show.h
+++ b/sql/sql_show.h
@@ -1,4 +1,5 @@
-/* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2005, 2010, Oracle and/or its affiliates.
+ Copyright (c) 2012, 2016, MariaDB
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
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index e2ad9237120..f19b4e4cb8d 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -1,6 +1,6 @@
/*
Copyright (c) 2000, 2015, Oracle and/or its affiliates.
- Copyright (c) 2010, 2015, MariaDB
+ Copyright (c) 2010, 2016, MariaDB
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
@@ -1674,8 +1674,6 @@ void execute_ddl_log_recovery()
mysql_mutex_unlock(&LOCK_gdl);
thd->reset_query();
delete thd;
- /* Remember that we don't have a THD */
- set_current_thd(0);
DBUG_VOID_RETURN;
}
@@ -2255,7 +2253,7 @@ int mysql_rm_table_no_locks(THD *thd, TABLE_LIST *tables, bool if_exists,
const char *comment_start;
uint32 comment_len;
- built_query.set_charset(system_charset_info);
+ built_query.set_charset(thd->charset());
if (if_exists)
built_query.append("DROP TABLE IF EXISTS ");
else
@@ -3476,8 +3474,31 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
else
{
/* Field redefined */
+
+ /*
+ If we are replacing a BIT field, revert the increment
+ of total_uneven_bit_length that was done above.
+ */
+ if (sql_field->sql_type == MYSQL_TYPE_BIT &&
+ file->ha_table_flags() & HA_CAN_BIT_FIELD)
+ total_uneven_bit_length-= sql_field->length & 7;
+
sql_field->def= dup_field->def;
sql_field->sql_type= dup_field->sql_type;
+
+ /*
+ If we are replacing a field with a BIT field, we need
+ to initialize pack_flag. Note that we do not need to
+ increment total_uneven_bit_length here as this dup_field
+ has already been processed.
+ */
+ if (sql_field->sql_type == MYSQL_TYPE_BIT)
+ {
+ sql_field->pack_flag= FIELDFLAG_NUMBER;
+ if (!(file->ha_table_flags() & HA_CAN_BIT_FIELD))
+ sql_field->pack_flag|= FIELDFLAG_TREAT_BIT_AS_CHAR;
+ }
+
sql_field->charset= (dup_field->charset ?
dup_field->charset :
create_info->default_table_charset);
@@ -6211,6 +6232,7 @@ static bool fill_alter_inplace_info(THD *thd,
c) flags passed to storage engine contain more detailed information
about nature of changes than those provided from parser.
*/
+ bool maybe_alter_vcol= false;
for (f_ptr= table->field; (field= *f_ptr); f_ptr++)
{
/* Clear marker for renamed or dropped field
@@ -6234,7 +6256,8 @@ static bool fill_alter_inplace_info(THD *thd,
/*
Check if type of column has changed to some incompatible type.
*/
- switch (field->is_equal(new_field))
+ uint is_equal= field->is_equal(new_field);
+ switch (is_equal)
{
case IS_EQUAL_NO:
/* New column type is incompatible with old one. */
@@ -6287,15 +6310,17 @@ static bool fill_alter_inplace_info(THD *thd,
}
/*
- Check if the altered column is computed and either
+ Check if the column is computed and either
is stored or is used in the partitioning expression.
- TODO: Mark such a column with an alter flag only if
- the defining expression has changed.
*/
if (field->vcol_info &&
(field->stored_in_db || field->vcol_info->is_in_partitioning_expr()))
{
- ha_alter_info->handler_flags|= Alter_inplace_info::ALTER_COLUMN_VCOL;
+ if (is_equal == IS_EQUAL_NO ||
+ !field->vcol_info->is_equal(new_field->vcol_info))
+ ha_alter_info->handler_flags|= Alter_inplace_info::ALTER_COLUMN_VCOL;
+ else
+ maybe_alter_vcol= true;
}
/* Check if field was renamed */
@@ -6361,6 +6386,21 @@ static bool fill_alter_inplace_info(THD *thd,
}
}
+ if (maybe_alter_vcol)
+ {
+ /*
+ No virtual column was altered, but perhaps one of the other columns was,
+ and that column was part of the vcol expression?
+ We don't detect this correctly (FIXME), so let's just say that a vcol
+ *might* be affected if any other column was altered.
+ */
+ if (ha_alter_info->handler_flags &
+ ( Alter_inplace_info::ALTER_COLUMN_TYPE
+ | Alter_inplace_info::ALTER_COLUMN_NOT_NULLABLE
+ | Alter_inplace_info::ALTER_COLUMN_OPTION ))
+ ha_alter_info->handler_flags|= Alter_inplace_info::ALTER_COLUMN_VCOL;
+ }
+
new_field_it.init(alter_info->create_list);
while ((new_field= new_field_it++))
{
@@ -6954,7 +6994,7 @@ static bool mysql_inplace_alter_table(THD *thd,
MDL_request *target_mdl_request,
Alter_table_ctx *alter_ctx)
{
- Open_table_context ot_ctx(thd, MYSQL_OPEN_REOPEN);
+ Open_table_context ot_ctx(thd, MYSQL_OPEN_REOPEN | MYSQL_OPEN_IGNORE_KILLED);
handlerton *db_type= table->s->db_type();
MDL_ticket *mdl_ticket= table->mdl_ticket;
HA_CREATE_INFO *create_info= ha_alter_info->create_info;
@@ -9181,13 +9221,13 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
error, but still worth reporting as it might indicate serious
problem with server.
*/
- goto err_with_mdl;
+ goto err_with_mdl_after_alter;
}
end_inplace:
if (thd->locked_tables_list.reopen_tables(thd))
- goto err_with_mdl;
+ goto err_with_mdl_after_alter;
THD_STAGE_INFO(thd, stage_end);
@@ -9286,6 +9326,10 @@ err_new_table_cleanup:
DBUG_RETURN(true);
+err_with_mdl_after_alter:
+ /* the table was altered. binlog the operation */
+ write_bin_log(thd, true, thd->query(), thd->query_length());
+
err_with_mdl:
/*
An error happened while we were holding exclusive name metadata lock
diff --git a/sql/sql_time.h b/sql/sql_time.h
index dc8e4668e1e..4eb43cc8b2f 100644
--- a/sql/sql_time.h
+++ b/sql/sql_time.h
@@ -1,4 +1,5 @@
-/* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2006, 2010, Oracle and/or its affiliates.
+ Copyright (c) 2011, 2016, MariaDB
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
diff --git a/sql/sql_udf.cc b/sql/sql_udf.cc
index 0f9043a77df..74d2f6bc252 100644
--- a/sql/sql_udf.cc
+++ b/sql/sql_udf.cc
@@ -258,8 +258,6 @@ void udf_init()
end:
close_mysql_tables(new_thd);
delete new_thd;
- /* Remember that we don't have a THD */
- set_current_thd(0);
DBUG_VOID_RETURN;
}
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index 4c1fdbfa93b..c07f492a485 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -2402,6 +2402,10 @@ int multi_update::do_updates()
int error;
if (table->default_field && (error= table->update_default_fields()))
goto err2;
+ if (table->vfield &&
+ update_virtual_fields(thd, table,
+ (table->triggers ? VCOL_UPDATE_ALL : VCOL_UPDATE_FOR_WRITE)))
+ goto err2;
if ((error= cur_table->view_check_option(thd, ignore)) !=
VIEW_CHECK_OK)
{
diff --git a/sql/sql_view.cc b/sql/sql_view.cc
index 3814d58ed75..0d88b3a1eda 100644
--- a/sql/sql_view.cc
+++ b/sql/sql_view.cc
@@ -1496,8 +1496,7 @@ bool mysql_make_view(THD *thd, File_parser *parser, TABLE_LIST *table,
/* Fields in this view can be used in upper select in case of merge. */
if (table->select_lex)
- table->select_lex->select_n_where_fields+=
- lex->select_lex.select_n_where_fields;
+ table->select_lex->add_where_field(&lex->select_lex);
}
/*
This method has a dependency on the proper lock type being set,
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index ba601aa772e..16916fb919d 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -3696,7 +3696,7 @@ sp_proc_stmt_statement:
if (yychar == YYEMPTY)
i->m_query.length= lip->get_ptr() - sp->m_tmp_query;
else
- i->m_query.length= lip->get_tok_end() - sp->m_tmp_query;
+ i->m_query.length= lip->get_tok_start() - sp->m_tmp_query;;
if (!(i->m_query.str= strmake_root(thd->mem_root,
sp->m_tmp_query,
i->m_query.length)) ||
@@ -10769,15 +10769,6 @@ table_factor:
sel->add_joined_table($$);
lex->pop_context();
lex->nest_level--;
- /*
- Fields in derived table can be used in upper select in
- case of merge. We do not add HAVING fields because we do
- not merge such derived. We do not add union because
- also do not merge them
- */
- if (!sel->next_select())
- $2->select_n_where_fields+=
- sel->select_n_where_fields;
}
/*else if (($3->select_lex &&
$3->select_lex->master_unit()->is_union() &&
@@ -10798,6 +10789,15 @@ table_factor:
nest_level is the same as in the outer query */
$$= $3;
}
+ /*
+ Fields in derived table can be used in upper select in
+ case of merge. We do not add HAVING fields because we do
+ not merge such derived. We do not add union because
+ also do not merge them
+ */
+ if ($$ && $$->derived &&
+ !$$->derived->first_select()->next_select())
+ $$->select_lex->add_where_field($$->derived->first_select());
}
;
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
index e971f367fa3..c49a5de75e3 100644
--- a/sql/sys_vars.cc
+++ b/sql/sys_vars.cc
@@ -4356,6 +4356,29 @@ static bool update_slave_skip_counter(sys_var *self, THD *thd, Master_info *mi)
mi->connection_name.str);
return true;
}
+ if (mi->using_gtid != Master_info::USE_GTID_NO &&
+ opt_slave_parallel_threads > 0)
+ {
+ ulong domain_count;
+ mysql_mutex_lock(&rpl_global_gtid_slave_state->LOCK_slave_state);
+ domain_count= rpl_global_gtid_slave_state->count();
+ mysql_mutex_unlock(&rpl_global_gtid_slave_state->LOCK_slave_state);
+ if (domain_count > 1)
+ {
+ /*
+ With domain-based parallel replication, the slave position is
+ multi-dimensional, so the relay log position is not very meaningful.
+ It might not even correspond to the next GTID to execute in _any_
+ domain (the case after error stop). So slave_skip_counter will most
+ likely not do what the user intends. Instead give an error, with a
+ suggestion to instead set @@gtid_slave_pos past the point of error;
+ this works reliably also in the case of multiple domains.
+ */
+ my_error(ER_SLAVE_SKIP_NOT_IN_GTID, MYF(0));
+ return true;
+ }
+ }
+
/* The value was stored temporarily in thd */
mi->rli.slave_skip_counter= thd->variables.slave_skip_counter;
return false;
diff --git a/sql/tztime.cc b/sql/tztime.cc
index 8e7200c9ba1..bea1d9c5d28 100644
--- a/sql/tztime.cc
+++ b/sql/tztime.cc
@@ -1803,11 +1803,7 @@ end:
if (org_thd)
org_thd->store_globals(); /* purecov: inspected */
else
- {
- /* Remember that we don't have a THD */
- set_current_thd(0);
my_pthread_setspecific_ptr(THR_MALLOC, 0);
- }
default_tz= default_tz_name ? global_system_variables.time_zone
: my_tz_SYSTEM;
diff --git a/storage/connect/fmdlex.c b/storage/connect/fmdlex.c
index 22c3a1e79ad..548a7ae5b7e 100644
--- a/storage/connect/fmdlex.c
+++ b/storage/connect/fmdlex.c
@@ -1,3 +1,5 @@
+#include <setjmp.h>
+
#define yyFlexLexer fmdfFlexLexer
#define yy_create_buffer fmdf_create_buffer
#define yy_delete_buffer fmdf_delete_buffer
@@ -506,13 +508,16 @@ YY_MALLOC_DECL
#define YY_BREAK break;
#endif
+static jmp_buf env;
+
YY_DECL
{
register yy_state_type yy_current_state;
register char *yy_cp, *yy_bp;
register int yy_act;
-
+ if (setjmp(env))
+ return -1;
/*************************************************************************/
/* Flex parser to analyze date format and produce input and/or output */
@@ -1316,7 +1321,7 @@ char msg[];
#endif
{
(void) fprintf( stderr, "%s\n", msg );
- exit( 1 );
+ longjmp(env, 1 );
}
diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc
index 049d6db21fd..645d0003c47 100644
--- a/storage/connect/ha_connect.cc
+++ b/storage/connect/ha_connect.cc
@@ -1,4 +1,4 @@
-/* Copyright (C) Olivier Bertrand 2004 - 2015
+/* Copyright (C) Olivier Bertrand 2004 - 2016
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
@@ -169,7 +169,7 @@
#define JSONMAX 10 // JSON Default max grp size
extern "C" {
- char version[]= "Version 1.04.0005 December 11, 2015";
+ char version[]= "Version 1.04.0005 January 24, 2016";
#if defined(__WIN__)
char compver[]= "Version 1.04.0005 " __DATE__ " " __TIME__;
char slash= '\\';
@@ -340,14 +340,21 @@ static MYSQL_THDVAR_ENUM(
#endif // XMSG || NEWMSG
/***********************************************************************/
+/* The CONNECT handlerton object. */
+/***********************************************************************/
+handlerton *connect_hton= NULL;
+
+/***********************************************************************/
/* Function to export session variable values to other source files. */
/***********************************************************************/
-extern "C" int GetTraceValue(void) {return THDVAR(current_thd, xtrace);}
+extern "C" int GetTraceValue(void)
+ {return connect_hton ? THDVAR(current_thd, xtrace) : 0;}
bool ExactInfo(void) {return THDVAR(current_thd, exact_info);}
USETEMP UseTemp(void) {return (USETEMP)THDVAR(current_thd, use_tempfile);}
int GetConvSize(void) {return THDVAR(current_thd, conv_size);}
TYPCONV GetTypeConv(void) {return (TYPCONV)THDVAR(current_thd, type_conv);}
-uint GetJsonGrpSize(void) {return THDVAR(current_thd, json_grp_size);}
+uint GetJsonGrpSize(void)
+ {return connect_hton ? THDVAR(current_thd, json_grp_size) : 10;}
uint GetWorkSize(void) {return THDVAR(current_thd, work_size);}
void SetWorkSize(uint)
{
@@ -442,11 +449,6 @@ static int check_msg_path (MYSQL_THD thd, struct st_mysql_sys_var *var,
} // end of check_msg_path
#endif // 0
-/***********************************************************************/
-/* The CONNECT handlerton object. */
-/***********************************************************************/
-handlerton *connect_hton;
-
/**
CREATE TABLE option list (table options)
@@ -687,6 +689,7 @@ static int connect_done_func(void *)
delete pc;
} // endfor pc
+ connect_hton= NULL;
DBUG_RETURN(error);
} // end of connect_done_func
@@ -4923,11 +4926,11 @@ static bool add_field(String *sql, const char *field_name, int typ, int len,
error|= sql->append("` ");
error|= sql->append(type);
- if (len && typ != TYPE_DATE) {
+ if (len && typ != TYPE_DATE && (typ != TYPE_DOUBLE || dec >= 0)) {
error|= sql->append('(');
error|= sql->append_ulonglong(len);
- if (!strcmp(type, "DOUBLE")) {
+ if (typ == TYPE_DOUBLE) {
error|= sql->append(',');
// dec must be < len and < 31
error|= sql->append_ulonglong(MY_MIN(dec, (MY_MIN(len, 31) - 1)));
@@ -5513,6 +5516,7 @@ static int connect_assisted_discovery(handlerton *, THD* thd,
dec= crp->Prec;
flg= crp->Flag;
v= crp->Var;
+ tm= (crp->Kdata->IsNullable()) ? 0 : NOT_NULL_FLAG;
if (!len && typ == TYPE_STRING)
len= 256; // STRBLK's have 0 length
@@ -5520,9 +5524,9 @@ static int connect_assisted_discovery(handlerton *, THD* thd,
// Now add the field
#if defined(NEW_WAY)
rc= add_fields(g, thd, &alter_info, cnm, typ, len, dec,
- NOT_NULL_FLAG, "", flg, dbf, v);
+ tm, "", flg, dbf, v);
#else // !NEW_WAY
- if (add_field(&sql, cnm, typ, len, dec, NULL, NOT_NULL_FLAG,
+ if (add_field(&sql, cnm, typ, len, dec, NULL, tm,
NULL, NULL, NULL, NULL, flg, dbf, v))
rc= HA_ERR_OUT_OF_MEM;
#endif // !NEW_WAY
@@ -5579,7 +5583,7 @@ static int connect_assisted_discovery(handlerton *, THD* thd,
len= crp->Kdata->GetIntValue(i);
break;
case FLD_SCALE:
- dec= crp->Kdata->GetIntValue(i);
+ dec = (!crp->Kdata->IsNull(i)) ? crp->Kdata->GetIntValue(i) : -1;
break;
case FLD_NULL:
if (crp->Kdata->GetIntValue(i))
@@ -5672,14 +5676,14 @@ static int connect_assisted_discovery(handlerton *, THD* thd,
dec= 0;
} // endswitch typ
- } // endif ttp
+ } else
#endif // ODBC_SUPPORT
-
// Make the arguments as required by add_fields
- if (typ == TYPE_DATE)
+ if (typ == TYPE_DOUBLE)
+ prec= len;
+
+ if (typ == TYPE_DATE)
prec= 0;
- else if (typ == TYPE_DOUBLE)
- prec= len;
// Now add the field
#if defined(NEW_WAY)
diff --git a/storage/connect/json.cpp b/storage/connect/json.cpp
index fc7edb84c0f..75bf277b25b 100644
--- a/storage/connect/json.cpp
+++ b/storage/connect/json.cpp
@@ -594,8 +594,8 @@ PSZ Serialize(PGLOBAL g, PJSON jsp, char *fn, int pretty)
if (fs) {
fputs(EL, fs);
fclose(fs);
- str = (err) ? NULL : "Ok";
- } else if (!err) {
+ str = (err) ? NULL : strcpy(g->Message, "Ok");
+ } else if (!err) {
str = ((JOUTSTR*)jp)->Strp;
jp->WriteChr('\0');
PlugSubAlloc(g, NULL, ((JOUTSTR*)jp)->N);
diff --git a/storage/connect/jsonudf.cpp b/storage/connect/jsonudf.cpp
index 40685ae0f0e..25c77cea534 100644
--- a/storage/connect/jsonudf.cpp
+++ b/storage/connect/jsonudf.cpp
@@ -31,6 +31,8 @@ uint GetJsonGrpSize(void);
static int IsJson(UDF_ARGS *args, uint i);
static PSZ MakePSZ(PGLOBAL g, UDF_ARGS *args, int i);
+static uint JsonGrpSize = 10;
+
/* ----------------------------------- JSNX ------------------------------------ */
/*********************************************************************************/
@@ -1040,6 +1042,14 @@ static void SetChanged(PBSON bsp)
} /* end of SetChanged */
/*********************************************************************************/
+/* Replaces GetJsonGrpSize not usable when CONNECT is not installed. */
+/*********************************************************************************/
+static uint GetJsonGroupSize(void)
+{
+ return (JsonGrpSize) ? JsonGrpSize : GetJsonGrpSize();
+} // end of GetJsonGroupSize
+
+/*********************************************************************************/
/* Program for SubSet re-initialization of the memory pool. */
/*********************************************************************************/
static my_bool JsonSubSet(PGLOBAL g)
@@ -2394,11 +2404,50 @@ void json_object_list_deinit(UDF_INIT* initid)
} // end of json_object_list_deinit
/*********************************************************************************/
+/* Set the value of JsonGrpSize. */
+/*********************************************************************************/
+my_bool jsonset_grp_size_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
+{
+ if (args->arg_count != 1 || args->arg_type[0] != INT_RESULT) {
+ strcpy(message, "This function must have 1 integer argument");
+ return true;
+ } else
+ return false;
+
+} // end of jsonset_grp_size_init
+
+long long jsonset_grp_size(UDF_INIT *initid, UDF_ARGS *args, char *, char *)
+{
+ long long n = *(long long*)args->args[0];
+
+ JsonGrpSize = (uint)n;
+ return (long long)GetJsonGroupSize();
+} // end of jsonset_grp_size
+
+/*********************************************************************************/
+/* Get the value of JsonGrpSize. */
+/*********************************************************************************/
+my_bool jsonget_grp_size_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
+{
+ if (args->arg_count != 0) {
+ strcpy(message, "This function must have no arguments");
+ return true;
+ } else
+ return false;
+
+} // end of jsonget_grp_size_init
+
+long long jsonget_grp_size(UDF_INIT *initid, UDF_ARGS *args, char *, char *)
+{
+ return (long long)GetJsonGroupSize();
+} // end of jsonget_grp_size
+
+/*********************************************************************************/
/* Make a Json array from values coming from rows. */
/*********************************************************************************/
my_bool json_array_grp_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
{
- unsigned long reslen, memlen, n = GetJsonGrpSize();
+ unsigned long reslen, memlen, n = GetJsonGroupSize();
if (args->arg_count != 1) {
strcpy(message, "This function can only accept 1 argument");
@@ -2458,7 +2507,7 @@ void json_array_grp_clear(UDF_INIT *initid, char*, char*)
PlugSubSet(g, g->Sarea, g->Sarea_Size);
g->Activityp = (PACTIVITY)new(g) JARRAY;
- g->N = GetJsonGrpSize();
+ g->N = GetJsonGroupSize();
} // end of json_array_grp_clear
void json_array_grp_deinit(UDF_INIT* initid)
@@ -2471,7 +2520,7 @@ void json_array_grp_deinit(UDF_INIT* initid)
/*********************************************************************************/
my_bool json_object_grp_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
{
- unsigned long reslen, memlen, n = GetJsonGrpSize();
+ unsigned long reslen, memlen, n = GetJsonGroupSize();
if (args->arg_count != 2) {
strcpy(message, "This function requires 2 arguments (key, value)");
@@ -2529,7 +2578,7 @@ void json_object_grp_clear(UDF_INIT *initid, char*, char*)
PlugSubSet(g, g->Sarea, g->Sarea_Size);
g->Activityp = (PACTIVITY)new(g) JOBJECT;
- g->N = GetJsonGrpSize();
+ g->N = GetJsonGroupSize();
} // end of json_object_grp_clear
void json_object_grp_deinit(UDF_INIT* initid)
@@ -3365,7 +3414,7 @@ my_bool jsoncontains_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
long long jsoncontains(UDF_INIT *initid, UDF_ARGS *args, char *result,
unsigned long *res_length, char *is_null, char *error)
{
- char *p, res[256];
+ char *p __attribute__((unused)), res[256];
long long n;
unsigned long reslen;
diff --git a/storage/connect/jsonudf.h b/storage/connect/jsonudf.h
index ecbbb778214..b7e9b8ecabb 100644
--- a/storage/connect/jsonudf.h
+++ b/storage/connect/jsonudf.h
@@ -77,6 +77,12 @@ extern "C" {
DllExport char *json_object_list(UDF_EXEC_ARGS);
DllExport void json_object_list_deinit(UDF_INIT*);
+ DllExport my_bool jsonset_grp_size_init(UDF_INIT*, UDF_ARGS*, char*);
+ DllExport long long jsonset_grp_size(UDF_INIT*, UDF_ARGS*, char*, char*);
+
+ DllExport my_bool jsonget_grp_size_init(UDF_INIT*, UDF_ARGS*, char*);
+ DllExport long long jsonget_grp_size(UDF_INIT*, UDF_ARGS*, char*, char*);
+
DllExport my_bool json_array_grp_init(UDF_INIT*, UDF_ARGS*, char*);
DllExport void json_array_grp_add(UDF_INIT *, UDF_ARGS *, char *, char *);
DllExport char *json_array_grp(UDF_EXEC_ARGS);
diff --git a/storage/connect/mycat.cc b/storage/connect/mycat.cc
index 2e9085b4c87..97ad980dd6a 100644
--- a/storage/connect/mycat.cc
+++ b/storage/connect/mycat.cc
@@ -1,4 +1,4 @@
-/* Copyright (C) Olivier Bertrand 2004 - 2015
+/* Copyright (C) Olivier Bertrand 2004 - 2016
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
@@ -18,7 +18,7 @@
/* ------------- */
/* Version 1.4 */
/* */
-/* Author: Olivier Bertrand 2012 - 2015 */
+/* Author: Olivier Bertrand 2012 - 2016 */
/* */
/* WHAT THIS PROGRAM DOES: */
/* ----------------------- */
@@ -509,30 +509,33 @@ void MYCAT::SetPath(PGLOBAL g, LPCSTR *datapath, const char *path)
/* GetTableDesc: retrieve a table descriptor. */
/* Look for a table descriptor matching the name and type. */
/***********************************************************************/
-PRELDEF MYCAT::GetTableDesc(PGLOBAL g, LPCSTR name,
+PRELDEF MYCAT::GetTableDesc(PGLOBAL g, PTABLE tablep,
LPCSTR type, PRELDEF *)
{
if (trace)
- printf("GetTableDesc: name=%s am=%s\n", name, SVP(type));
+ printf("GetTableDesc: name=%s am=%s\n", tablep->GetName(), SVP(type));
// If not specified get the type of this table
if (!type)
type= Hc->GetStringOption("Type","*");
- return MakeTableDesc(g, name, type);
+ return MakeTableDesc(g, tablep, type);
} // end of GetTableDesc
/***********************************************************************/
/* MakeTableDesc: make a table/view description. */
/* Note: caller must check if name already exists before calling it. */
/***********************************************************************/
-PRELDEF MYCAT::MakeTableDesc(PGLOBAL g, LPCSTR name, LPCSTR am)
+PRELDEF MYCAT::MakeTableDesc(PGLOBAL g, PTABLE tablep, LPCSTR am)
{
TABTYPE tc;
+ LPCSTR name = (PSZ)PlugDup(g, tablep->GetName());
+ LPCSTR schema = (PSZ)PlugDup(g, tablep->GetSchema());
PRELDEF tdp= NULL;
if (trace)
- printf("MakeTableDesc: name=%s am=%s\n", name, SVP(am));
+ printf("MakeTableDesc: name=%s schema=%s am=%s\n",
+ name, SVP(schema), SVP(am));
/*********************************************************************/
/* Get a unique enum identifier for types. */
@@ -571,11 +574,11 @@ PRELDEF MYCAT::MakeTableDesc(PGLOBAL g, LPCSTR name, LPCSTR am)
case TAB_VIR: tdp= new(g) VIRDEF; break;
case TAB_JSON: tdp= new(g) JSONDEF; break;
default:
- sprintf(g->Message, MSG(BAD_TABLE_TYPE), am, name);
+ sprintf(g->Message, MSG(BAD_TABLE_TYPE), am, name);
} // endswitch
// Do make the table/view definition
- if (tdp && tdp->Define(g, this, name, am))
+ if (tdp && tdp->Define(g, this, name, schema, am))
tdp= NULL;
return tdp;
@@ -588,20 +591,20 @@ PTDB MYCAT::GetTable(PGLOBAL g, PTABLE tablep, MODE mode, LPCSTR type)
{
PRELDEF tdp;
PTDB tdbp= NULL;
- LPCSTR name= tablep->GetName();
+// LPCSTR name= tablep->GetName();
if (trace)
- printf("GetTableDB: name=%s\n", name);
+ printf("GetTableDB: name=%s\n", tablep->GetName());
// Look for the description of the requested table
- tdp= GetTableDesc(g, name, type);
+ tdp= GetTableDesc(g, tablep, type);
if (tdp) {
if (trace)
printf("tdb=%p type=%s\n", tdp, tdp->GetType());
- if (tablep->GetQualifier())
- tdp->Database = SetPath(g, tablep->GetQualifier());
+ if (tablep->GetSchema())
+ tdp->Database = SetPath(g, tablep->GetSchema());
tdbp= tdp->GetTable(g, mode);
} // endif tdp
diff --git a/storage/connect/mycat.h b/storage/connect/mycat.h
index dfcbb2f6766..05163f08f1b 100644
--- a/storage/connect/mycat.h
+++ b/storage/connect/mycat.h
@@ -100,15 +100,17 @@ class MYCAT : public CATALOG {
//void SetDataPath(PGLOBAL g, const char *path)
// {SetPath(g, &DataPath, path);}
bool StoreIndex(PGLOBAL, PTABDEF) {return false;} // Temporary
- PRELDEF GetTableDesc(PGLOBAL g, LPCSTR name,
- LPCSTR type, PRELDEF *prp = NULL);
+// PRELDEF GetTableDesc(PGLOBAL g, LPCSTR name,
+ PRELDEF GetTableDesc(PGLOBAL g, PTABLE tablep,
+ LPCSTR type, PRELDEF *prp = NULL);
PTDB GetTable(PGLOBAL g, PTABLE tablep,
MODE mode = MODE_READ, LPCSTR type = NULL);
void ClearDB(PGLOBAL g);
protected:
- PRELDEF MakeTableDesc(PGLOBAL g, LPCSTR name, LPCSTR am);
-//void SetPath(PGLOBAL g, LPCSTR *datapath, const char *path);
+// PRELDEF MakeTableDesc(PGLOBAL g, LPCSTR name, LPCSTR am);
+ PRELDEF MakeTableDesc(PGLOBAL g, PTABLE tablep, LPCSTR am);
+ //void SetPath(PGLOBAL g, LPCSTR *datapath, const char *path);
// Members
ha_connect *Hc; // The Connect handler
diff --git a/storage/connect/mysql-test/connect/r/json_udf.result b/storage/connect/mysql-test/connect/r/json_udf.result
index 5089022c5ea..1e83834cb8f 100644
--- a/storage/connect/mysql-test/connect/r/json_udf.result
+++ b/storage/connect/mysql-test/connect/r/json_udf.result
@@ -217,7 +217,9 @@ DEPARTMENT Json_Array_Grp(NAME)
2452 ["BIGHEAD","ORELLY","BIGHORN","SMITH","CHERRY"]
Warnings:
Warning 1105 Result truncated to json_grp_size values
-SET connect_json_grp_size=30;
+SELECT JsonSet_Grp_Size(30);
+JsonSet_Grp_Size(30)
+30
SELECT Json_Object(title, Json_Array_Grp(name) `json_names`) from t3 GROUP BY title;
Json_Object(title, Json_Array_Grp(name) `json_names`)
{"title":"ADMINISTRATOR","names":["GOOSEPEN","FUNNIGUY","SHRINKY"]}
diff --git a/storage/connect/mysql-test/connect/r/odbc.result b/storage/connect/mysql-test/connect/r/odbc.result
index 8e1951f0b68..4ca7e2095df 100644
--- a/storage/connect/mysql-test/connect/r/odbc.result
+++ b/storage/connect/mysql-test/connect/r/odbc.result
@@ -5,7 +5,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`Name` varchar(256) NOT NULL,
- `Description` varchar(256) NOT NULL
+ `Description` varchar(256) DEFAULT NULL
) ENGINE=CONNECT DEFAULT CHARSET=latin1 `TABLE_TYPE`='ODBC' `CATFUNC`='Sources'
DROP TABLE t1;
CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=ODBC CATFUNC=Drivers;
@@ -13,35 +13,35 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`Description` char(128) NOT NULL,
- `Attributes` varchar(256) NOT NULL
+ `Attributes` varchar(256) DEFAULT NULL
) ENGINE=CONNECT DEFAULT CHARSET=latin1 `TABLE_TYPE`='ODBC' `CATFUNC`='Drivers'
DROP TABLE t1;
CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=ODBC CATFUNC=Tables CONNECTION='Not important';
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `Table_Cat` char(128) NOT NULL,
- `Table_Schema` char(128) NOT NULL,
+ `Table_Cat` char(128) DEFAULT NULL,
+ `Table_Schema` char(128) DEFAULT NULL,
`Table_Name` char(128) NOT NULL,
`Table_Type` char(16) NOT NULL,
- `Remark` char(255) NOT NULL
+ `Remark` char(255) DEFAULT NULL
) ENGINE=CONNECT DEFAULT CHARSET=latin1 CONNECTION='Not important' `TABLE_TYPE`='ODBC' `CATFUNC`='Tables'
DROP TABLE t1;
CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=ODBC CATFUNC=Columns CONNECTION='Not important';
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `Table_Cat` char(128) NOT NULL,
- `Table_Schema` char(128) NOT NULL,
+ `Table_Cat` char(128) DEFAULT NULL,
+ `Table_Schema` char(128) DEFAULT NULL,
`Table_Name` char(128) NOT NULL,
`Column_Name` char(128) NOT NULL,
`Data_Type` smallint(6) NOT NULL,
`Type_Name` char(30) NOT NULL,
`Column_Size` int(10) NOT NULL,
`Buffer_Length` int(10) NOT NULL,
- `Decimal_Digits` smallint(6) NOT NULL,
- `Radix` smallint(6) NOT NULL,
+ `Decimal_Digits` smallint(6) DEFAULT NULL,
+ `Radix` smallint(6) DEFAULT NULL,
`Nullable` smallint(6) NOT NULL,
- `Remarks` char(255) NOT NULL
+ `Remarks` char(255) DEFAULT NULL
) ENGINE=CONNECT DEFAULT CHARSET=latin1 CONNECTION='Not important' `TABLE_TYPE`='ODBC' `CATFUNC`='Columns'
DROP TABLE t1;
diff --git a/storage/connect/mysql-test/connect/r/odbc_oracle.result b/storage/connect/mysql-test/connect/r/odbc_oracle.result
index 96d8e53b8e5..8dc7dc07bb1 100644
--- a/storage/connect/mysql-test/connect/r/odbc_oracle.result
+++ b/storage/connect/mysql-test/connect/r/odbc_oracle.result
@@ -1,7 +1,7 @@
Table Create Table
t1 CREATE TABLE `t1` (
`Name` varchar(256) NOT NULL,
- `Description` varchar(256) NOT NULL
+ `Description` varchar(256) DEFAULT NULL
) ENGINE=CONNECT DEFAULT CHARSET=latin1 `TABLE_TYPE`='ODBC' `CATFUNC`='Sources'
SET NAMES utf8;
#
@@ -14,9 +14,9 @@ TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr'
CATFUNC=Tables;
SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name;
Table_Cat Table_Schema Table_Name Table_Type Remark
- MTR T1 TABLE
- MTR T2 TABLE
- MTR V1 VIEW
+NULL MTR T1 TABLE NULL
+NULL MTR T2 TABLE NULL
+NULL MTR V1 VIEW NULL
DROP TABLE t1;
# All tables in all schemas (filtered with WHERE)
CREATE TABLE t1 ENGINE=CONNECT
@@ -24,9 +24,9 @@ TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr'
CATFUNC=Tables TABNAME='%.%';
SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name;
Table_Cat Table_Schema Table_Name Table_Type Remark
- MTR T1 TABLE
- MTR T2 TABLE
- MTR V1 VIEW
+NULL MTR T1 TABLE NULL
+NULL MTR T2 TABLE NULL
+NULL MTR V1 VIEW NULL
DROP TABLE t1;
# All tables "T1" in all schemas (filtered with WHERE)
CREATE TABLE t1 ENGINE=CONNECT
@@ -34,7 +34,7 @@ TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr'
CATFUNC=Tables TABNAME='%.T1';
SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name;
Table_Cat Table_Schema Table_Name Table_Type Remark
- MTR T1 TABLE
+NULL MTR T1 TABLE NULL
DROP TABLE t1;
# All tables "T1" in all schemas (filtered with WHERE)
CREATE TABLE t1 ENGINE=CONNECT
@@ -42,7 +42,7 @@ TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr'
CATFUNC=Tables TABNAME='T1';
SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name;
Table_Cat Table_Schema Table_Name Table_Type Remark
- MTR T1 TABLE
+NULL MTR T1 TABLE NULL
DROP TABLE t1;
# Table "T1" in the schema "MTR"
CREATE TABLE t1 ENGINE=CONNECT
@@ -50,7 +50,7 @@ TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr'
CATFUNC=Tables TABNAME='MTR.T1';
SELECT * FROM t1 ORDER BY Table_Schema, Table_Name;
Table_Cat Table_Schema Table_Name Table_Type Remark
- MTR T1 TABLE
+NULL MTR T1 TABLE NULL
DROP TABLE t1;
# All tables in the schema "MTR"
CREATE TABLE t1 ENGINE=CONNECT
@@ -58,9 +58,9 @@ TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr'
CATFUNC=Tables TABNAME='MTR.%';
SELECT * FROM t1 ORDER BY Table_Schema, Table_Name;
Table_Cat Table_Schema Table_Name Table_Type Remark
- MTR T1 TABLE
- MTR T2 TABLE
- MTR V1 VIEW
+NULL MTR T1 TABLE NULL
+NULL MTR T2 TABLE NULL
+NULL MTR V1 VIEW NULL
DROP TABLE t1;
#
# Checking CATFUNC=Columns
@@ -73,10 +73,10 @@ CATFUNC=Columns;
SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name;
Table_Cat Table_Schema Table_Name Column_Name Data_Type Type_Name Column_Size Buffer_Length Decimal_Digits Radix Nullable Remarks
MTR T1 A 3 DECIMAL 38 40 0 10 1
- MTR T1 B 6 NUMBER 38 40 0 0 1
- MTR T2 A 12 VARCHAR2 64 64 0 0 1
+ MTR T1 B 6 NUMBER 38 40 NULL NULL 1
+ MTR T2 A 12 VARCHAR2 64 64 NULL NULL 1
MTR V1 A 3 DECIMAL 38 40 0 10 1
- MTR V1 B 6 NUMBER 38 40 0 0 1
+ MTR V1 B 6 NUMBER 38 40 NULL NULL 1
DROP TABLE t1;
# All columns in all schemas (limited with WHERE)
CREATE TABLE t1 ENGINE=CONNECT
@@ -85,17 +85,17 @@ CATFUNC=Columns TABNAME='%.%';
SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name;
Table_Cat Table_Schema Table_Name Column_Name Data_Type Type_Name Column_Size Buffer_Length Decimal_Digits Radix Nullable Remarks
MTR T1 A 3 DECIMAL 38 40 0 10 1
- MTR T1 B 6 NUMBER 38 40 0 0 1
- MTR T2 A 12 VARCHAR2 64 64 0 0 1
+ MTR T1 B 6 NUMBER 38 40 NULL NULL 1
+ MTR T2 A 12 VARCHAR2 64 64 NULL NULL 1
MTR V1 A 3 DECIMAL 38 40 0 10 1
- MTR V1 B 6 NUMBER 38 40 0 0 1
+ MTR V1 B 6 NUMBER 38 40 NULL NULL 1
DROP TABLE t1;
# All tables "T1" in all schemas (limited with WHERE)
CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr' CATFUNC=Columns TABNAME='%.T1';
SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name;
Table_Cat Table_Schema Table_Name Column_Name Data_Type Type_Name Column_Size Buffer_Length Decimal_Digits Radix Nullable Remarks
MTR T1 A 3 DECIMAL 38 40 0 10 1
- MTR T1 B 6 NUMBER 38 40 0 0 1
+ MTR T1 B 6 NUMBER 38 40 NULL NULL 1
DROP TABLE t1;
# Table "T1" in the schema "MTR"
CREATE TABLE t1 ENGINE=CONNECT
@@ -104,7 +104,7 @@ CATFUNC=Columns TABNAME='MTR.T1';
SELECT * FROM t1 ORDER BY Table_Schema, Table_Name;
Table_Cat Table_Schema Table_Name Column_Name Data_Type Type_Name Column_Size Buffer_Length Decimal_Digits Radix Nullable Remarks
MTR T1 A 3 DECIMAL 38 40 0 10 1
- MTR T1 B 6 NUMBER 38 40 0 0 1
+ MTR T1 B 6 NUMBER 38 40 NULL NULL 1
DROP TABLE t1;
# All tables "T1" in all schemas (filtered with WHERE)
CREATE TABLE t1 ENGINE=CONNECT
@@ -113,7 +113,7 @@ CATFUNC=Columns TABNAME='%.T1';
SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name;
Table_Cat Table_Schema Table_Name Column_Name Data_Type Type_Name Column_Size Buffer_Length Decimal_Digits Radix Nullable Remarks
MTR T1 A 3 DECIMAL 38 40 0 10 1
- MTR T1 B 6 NUMBER 38 40 0 0 1
+ MTR T1 B 6 NUMBER 38 40 NULL NULL 1
DROP TABLE t1;
#
# Checking tables
@@ -127,32 +127,32 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`A` decimal(40,0) DEFAULT NULL,
- `B` double(40,0) DEFAULT NULL
+ `B` double DEFAULT NULL
) ENGINE=CONNECT DEFAULT CHARSET=latin1 CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr' `TABLE_TYPE`='ODBC' `TABNAME`='T1'
SELECT * FROM t1 ORDER BY A;
A B
10 1000000000
20 1000000000000
-30 1000000000000000
+30 1e15
CREATE TABLE t2 AS SELECT * FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`A` decimal(40,0) DEFAULT NULL,
- `B` double(40,0) DEFAULT NULL
+ `B` double DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM t2;
A B
10 1000000000
20 1000000000000
-30 1000000000000000
+30 1e15
DROP TABLE t2;
CREATE VIEW v1 AS SELECT * FROM t1;
SELECT * FROM v1;
A B
10 1000000000
20 1000000000000
-30 1000000000000000
+30 1e15
DROP VIEW v1;
DROP TABLE t1;
# Table "T1" in the schema "MTR"
@@ -163,13 +163,13 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`A` decimal(40,0) DEFAULT NULL,
- `B` double(40,0) DEFAULT NULL
+ `B` double DEFAULT NULL
) ENGINE=CONNECT DEFAULT CHARSET=latin1 CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr' `TABLE_TYPE`='ODBC' `TABNAME`='MTR.T1'
SELECT * FROM t1;
A B
10 1000000000
20 1000000000000
-30 1000000000000000
+30 1e15
DROP TABLE t1;
# View "V1" in the schema "MTR"
CREATE TABLE t1 ENGINE=CONNECT
@@ -179,32 +179,32 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`A` decimal(40,0) DEFAULT NULL,
- `B` double(40,0) DEFAULT NULL
+ `B` double DEFAULT NULL
) ENGINE=CONNECT DEFAULT CHARSET=latin1 CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr' `TABLE_TYPE`='ODBC' `TABNAME`='MTR.V1'
SELECT * FROM t1;
A B
10 1000000000
20 1000000000000
-30 1000000000000000
+30 1e15
CREATE TABLE t2 AS SELECT * FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`A` decimal(40,0) DEFAULT NULL,
- `B` double(40,0) DEFAULT NULL
+ `B` double DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM t2;
A B
10 1000000000
20 1000000000000
-30 1000000000000000
+30 1e15
DROP TABLE t2;
CREATE VIEW v1 AS SELECT * FROM t1;
SELECT * FROM v1;
A B
10 1000000000
20 1000000000000
-30 1000000000000000
+30 1e15
DROP VIEW v1;
DROP TABLE t1;
# Table "T2" in the schema "MTR"
diff --git a/storage/connect/mysql-test/connect/r/odbc_postgresql.result b/storage/connect/mysql-test/connect/r/odbc_postgresql.result
index 68ce03cb382..3426d23e29c 100644
--- a/storage/connect/mysql-test/connect/r/odbc_postgresql.result
+++ b/storage/connect/mysql-test/connect/r/odbc_postgresql.result
@@ -1,7 +1,7 @@
Table Create Table
t1 CREATE TABLE `t1` (
`Name` varchar(256) NOT NULL,
- `Description` varchar(256) NOT NULL
+ `Description` varchar(256) DEFAULT NULL
) ENGINE=CONNECT DEFAULT CHARSET=latin1 `TABLE_TYPE`='ODBC' `CATFUNC`='Sources'
SET NAMES utf8;
#
@@ -99,9 +99,9 @@ Table_Cat Table_Schema Table_Name Column_Name Data_Type Type_Name Column_Size Bu
mtr public t1 a 4 int4 10 4 0 10 0
mtr public t2 a 4 int4 10 4 0 10 0
mtr public v1 a 4 int4 10 4 0 10 1
-mtr schema1 t1 a 1 bpchar 10 60 0 0 0
-mtr schema1 t2 a 1 bpchar 10 60 0 0 0
-mtr schema1 v1 a 1 bpchar 10 60 0 0 1
+mtr schema1 t1 a 1 bpchar 10 60 NULL NULL 0
+mtr schema1 t2 a 1 bpchar 10 60 NULL NULL 0
+mtr schema1 v1 a 1 bpchar 10 60 NULL NULL 1
DROP TABLE t1;
# All columns in the schemas "public" and "schema1"
CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEnginePostgresql;UID=mtr;PWD=mtr' CATFUNC=Columns TABNAME='%.%.%';
@@ -110,16 +110,16 @@ Table_Cat Table_Schema Table_Name Column_Name Data_Type Type_Name Column_Size Bu
mtr public t1 a 4 int4 10 4 0 10 0
mtr public t2 a 4 int4 10 4 0 10 0
mtr public v1 a 4 int4 10 4 0 10 1
-mtr schema1 t1 a 1 bpchar 10 60 0 0 0
-mtr schema1 t2 a 1 bpchar 10 60 0 0 0
-mtr schema1 v1 a 1 bpchar 10 60 0 0 1
+mtr schema1 t1 a 1 bpchar 10 60 NULL NULL 0
+mtr schema1 t2 a 1 bpchar 10 60 NULL NULL 0
+mtr schema1 v1 a 1 bpchar 10 60 NULL NULL 1
DROP TABLE t1;
# All tables "t1" in all schemas
CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEnginePostgresql;UID=mtr;PWD=mtr' CATFUNC=Columns TABNAME='%.%.t1';
SELECT * FROM t1 ORDER BY Table_Schema, Table_Name;
Table_Cat Table_Schema Table_Name Column_Name Data_Type Type_Name Column_Size Buffer_Length Decimal_Digits Radix Nullable Remarks
mtr public t1 a 4 int4 10 4 0 10 0
-mtr schema1 t1 a 1 bpchar 10 60 0 0 0
+mtr schema1 t1 a 1 bpchar 10 60 NULL NULL 0
DROP TABLE t1;
# Table "t1" in the schema "public"
CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEnginePostgresql;UID=mtr;PWD=mtr' CATFUNC=Columns TABNAME='%.public.t1';
@@ -131,14 +131,14 @@ DROP TABLE t1;
CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEnginePostgresql;UID=mtr;PWD=mtr' CATFUNC=Columns TABNAME='%.schema1.t1';
SELECT * FROM t1 ORDER BY Table_Schema, Table_Name;
Table_Cat Table_Schema Table_Name Column_Name Data_Type Type_Name Column_Size Buffer_Length Decimal_Digits Radix Nullable Remarks
-mtr schema1 t1 a 1 bpchar 10 60 0 0 0
+mtr schema1 t1 a 1 bpchar 10 60 NULL NULL 0
DROP TABLE t1;
# All tables "t1" in all schemas (Catalog name is ignored by PostgreSQL)
CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEnginePostgresql;UID=mtr;PWD=mtr' CATFUNC=Columns TABNAME='xxx.%.t1';
SELECT * FROM t1 ORDER BY Table_Schema, Table_Name;
Table_Cat Table_Schema Table_Name Column_Name Data_Type Type_Name Column_Size Buffer_Length Decimal_Digits Radix Nullable Remarks
mtr public t1 a 4 int4 10 4 0 10 0
-mtr schema1 t1 a 1 bpchar 10 60 0 0 0
+mtr schema1 t1 a 1 bpchar 10 60 NULL NULL 0
DROP TABLE t1;
#
# Checking tables
diff --git a/storage/connect/mysql-test/connect/r/odbc_sqlite3.result b/storage/connect/mysql-test/connect/r/odbc_sqlite3.result
index 24de417792d..bce69227073 100644
--- a/storage/connect/mysql-test/connect/r/odbc_sqlite3.result
+++ b/storage/connect/mysql-test/connect/r/odbc_sqlite3.result
@@ -1,7 +1,7 @@
Table Create Table
t1 CREATE TABLE `t1` (
`Description` char(128) NOT NULL,
- `Attributes` varchar(256) NOT NULL
+ `Attributes` varchar(256) DEFAULT NULL
) ENGINE=CONNECT DEFAULT CHARSET=latin1 `TABLE_TYPE`='ODBC' `CATFUNC`='Drivers'
SET NAMES utf8;
CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=ODBC CONNECTION='Driver=SQLite3 ODBC Driver;Database=MTR_SUITE_DIR/std_data/test.sqlite3;NoWCHAR=yes' CHARSET=utf8 DATA_CHARSET=utf8;;
@@ -44,2420 +44,2420 @@ DROP TABLE t1;
CREATE TABLE t1 ENGINE=CONNECT CATFUNC=Columns TABNAME='t1' TABLE_TYPE=ODBC CONNECTION='Driver=SQLite3 ODBC Driver;Database=MTR_SUITE_DIR/std_data/test.sqlite3;NoWCHAR=yes' CHARSET=utf8 DATA_CHARSET=utf8;
SELECT * FROM t1;
Table_Cat Table_Schema Table_Name Column_Name Data_Type Type_Name Column_Size Buffer_Length Decimal_Digits Radix Nullable Remarks
- t1 a 12 varchar(64) 64 64 10 0 1
+ t1 a 12 varchar(64) 64 64 10 0 1 NULL
DROP TABLE t1;
CREATE TABLE t1 ENGINE=CONNECT CATFUNC=Tables TABNAME='t1' TABLE_TYPE=ODBC CONNECTION='Driver=SQLite3 ODBC Driver;Database=MTR_SUITE_DIR/std_data/test.sqlite3;NoWCHAR=yes' CHARSET=utf8 DATA_CHARSET=utf8;
SELECT * FROM t1;
Table_Cat Table_Schema Table_Name Table_Type Remark
- t1 TABLE
+NULL NULL t1 TABLE NULL
DROP TABLE t1;
CREATE TABLE t1 ENGINE=CONNECT CATFUNC=Columns TABLE_TYPE=ODBC CONNECTION='Driver=SQLite3 ODBC Driver;Database=MTR_SUITE_DIR/std_data/test.sqlite3;NoWCHAR=yes' CHARSET=utf8 DATA_CHARSET=utf8;
SELECT * FROM t1 ORDER BY Table_name;
Table_Cat Table_Schema Table_Name Column_Name Data_Type Type_Name Column_Size Buffer_Length Decimal_Digits Radix Nullable Remarks
- t000 a 4 INT 9 10 10 0 1
- t000 b 4 INT 9 10 10 0 1
- t000 c 4 INT 9 10 10 0 1
- t000 d 4 INT 9 10 10 0 1
- t000 e 4 INT 9 10 10 0 1
- t001 a 4 INT 9 10 10 0 1
- t001 b 4 INT 9 10 10 0 1
- t001 c 4 INT 9 10 10 0 1
- t001 d 4 INT 9 10 10 0 1
- t001 e 4 INT 9 10 10 0 1
- t002 a 4 INT 9 10 10 0 1
- t002 b 4 INT 9 10 10 0 1
- t002 c 4 INT 9 10 10 0 1
- t002 d 4 INT 9 10 10 0 1
- t002 e 4 INT 9 10 10 0 1
- t003 a 4 INT 9 10 10 0 1
- t003 b 4 INT 9 10 10 0 1
- t003 c 4 INT 9 10 10 0 1
- t003 d 4 INT 9 10 10 0 1
- t003 e 4 INT 9 10 10 0 1
- t004 a 4 INT 9 10 10 0 1
- t004 b 4 INT 9 10 10 0 1
- t004 c 4 INT 9 10 10 0 1
- t004 d 4 INT 9 10 10 0 1
- t004 e 4 INT 9 10 10 0 1
- t005 a 4 INT 9 10 10 0 1
- t005 b 4 INT 9 10 10 0 1
- t005 c 4 INT 9 10 10 0 1
- t005 d 4 INT 9 10 10 0 1
- t005 e 4 INT 9 10 10 0 1
- t006 a 4 INT 9 10 10 0 1
- t006 b 4 INT 9 10 10 0 1
- t006 c 4 INT 9 10 10 0 1
- t006 d 4 INT 9 10 10 0 1
- t006 e 4 INT 9 10 10 0 1
- t007 a 4 INT 9 10 10 0 1
- t007 b 4 INT 9 10 10 0 1
- t007 c 4 INT 9 10 10 0 1
- t007 d 4 INT 9 10 10 0 1
- t007 e 4 INT 9 10 10 0 1
- t008 a 4 INT 9 10 10 0 1
- t008 b 4 INT 9 10 10 0 1
- t008 c 4 INT 9 10 10 0 1
- t008 d 4 INT 9 10 10 0 1
- t008 e 4 INT 9 10 10 0 1
- t009 a 4 INT 9 10 10 0 1
- t009 b 4 INT 9 10 10 0 1
- t009 c 4 INT 9 10 10 0 1
- t009 d 4 INT 9 10 10 0 1
- t009 e 4 INT 9 10 10 0 1
- t010 a 4 INT 9 10 10 0 1
- t010 b 4 INT 9 10 10 0 1
- t010 c 4 INT 9 10 10 0 1
- t010 d 4 INT 9 10 10 0 1
- t010 e 4 INT 9 10 10 0 1
- t011 a 4 INT 9 10 10 0 1
- t011 b 4 INT 9 10 10 0 1
- t011 c 4 INT 9 10 10 0 1
- t011 d 4 INT 9 10 10 0 1
- t011 e 4 INT 9 10 10 0 1
- t012 a 4 INT 9 10 10 0 1
- t012 b 4 INT 9 10 10 0 1
- t012 c 4 INT 9 10 10 0 1
- t012 d 4 INT 9 10 10 0 1
- t012 e 4 INT 9 10 10 0 1
- t013 a 4 INT 9 10 10 0 1
- t013 b 4 INT 9 10 10 0 1
- t013 c 4 INT 9 10 10 0 1
- t013 d 4 INT 9 10 10 0 1
- t013 e 4 INT 9 10 10 0 1
- t014 a 4 INT 9 10 10 0 1
- t014 b 4 INT 9 10 10 0 1
- t014 c 4 INT 9 10 10 0 1
- t014 d 4 INT 9 10 10 0 1
- t014 e 4 INT 9 10 10 0 1
- t015 a 4 INT 9 10 10 0 1
- t015 b 4 INT 9 10 10 0 1
- t015 c 4 INT 9 10 10 0 1
- t015 d 4 INT 9 10 10 0 1
- t015 e 4 INT 9 10 10 0 1
- t016 a 4 INT 9 10 10 0 1
- t016 b 4 INT 9 10 10 0 1
- t016 c 4 INT 9 10 10 0 1
- t016 d 4 INT 9 10 10 0 1
- t016 e 4 INT 9 10 10 0 1
- t017 a 4 INT 9 10 10 0 1
- t017 b 4 INT 9 10 10 0 1
- t017 c 4 INT 9 10 10 0 1
- t017 d 4 INT 9 10 10 0 1
- t017 e 4 INT 9 10 10 0 1
- t018 a 4 INT 9 10 10 0 1
- t018 b 4 INT 9 10 10 0 1
- t018 c 4 INT 9 10 10 0 1
- t018 d 4 INT 9 10 10 0 1
- t018 e 4 INT 9 10 10 0 1
- t019 a 4 INT 9 10 10 0 1
- t019 b 4 INT 9 10 10 0 1
- t019 c 4 INT 9 10 10 0 1
- t019 d 4 INT 9 10 10 0 1
- t019 e 4 INT 9 10 10 0 1
- t020 a 4 INT 9 10 10 0 1
- t020 b 4 INT 9 10 10 0 1
- t020 c 4 INT 9 10 10 0 1
- t020 d 4 INT 9 10 10 0 1
- t020 e 4 INT 9 10 10 0 1
- t021 a 4 INT 9 10 10 0 1
- t021 b 4 INT 9 10 10 0 1
- t021 c 4 INT 9 10 10 0 1
- t021 d 4 INT 9 10 10 0 1
- t021 e 4 INT 9 10 10 0 1
- t022 a 4 INT 9 10 10 0 1
- t022 b 4 INT 9 10 10 0 1
- t022 c 4 INT 9 10 10 0 1
- t022 d 4 INT 9 10 10 0 1
- t022 e 4 INT 9 10 10 0 1
- t023 a 4 INT 9 10 10 0 1
- t023 b 4 INT 9 10 10 0 1
- t023 c 4 INT 9 10 10 0 1
- t023 d 4 INT 9 10 10 0 1
- t023 e 4 INT 9 10 10 0 1
- t024 a 4 INT 9 10 10 0 1
- t024 b 4 INT 9 10 10 0 1
- t024 c 4 INT 9 10 10 0 1
- t024 d 4 INT 9 10 10 0 1
- t024 e 4 INT 9 10 10 0 1
- t025 a 4 INT 9 10 10 0 1
- t025 b 4 INT 9 10 10 0 1
- t025 c 4 INT 9 10 10 0 1
- t025 d 4 INT 9 10 10 0 1
- t025 e 4 INT 9 10 10 0 1
- t026 a 4 INT 9 10 10 0 1
- t026 b 4 INT 9 10 10 0 1
- t026 c 4 INT 9 10 10 0 1
- t026 d 4 INT 9 10 10 0 1
- t026 e 4 INT 9 10 10 0 1
- t027 a 4 INT 9 10 10 0 1
- t027 b 4 INT 9 10 10 0 1
- t027 c 4 INT 9 10 10 0 1
- t027 d 4 INT 9 10 10 0 1
- t027 e 4 INT 9 10 10 0 1
- t028 a 4 INT 9 10 10 0 1
- t028 b 4 INT 9 10 10 0 1
- t028 c 4 INT 9 10 10 0 1
- t028 d 4 INT 9 10 10 0 1
- t028 e 4 INT 9 10 10 0 1
- t029 a 4 INT 9 10 10 0 1
- t029 b 4 INT 9 10 10 0 1
- t029 c 4 INT 9 10 10 0 1
- t029 d 4 INT 9 10 10 0 1
- t029 e 4 INT 9 10 10 0 1
- t030 a 4 INT 9 10 10 0 1
- t030 b 4 INT 9 10 10 0 1
- t030 c 4 INT 9 10 10 0 1
- t030 d 4 INT 9 10 10 0 1
- t030 e 4 INT 9 10 10 0 1
- t031 a 4 INT 9 10 10 0 1
- t031 b 4 INT 9 10 10 0 1
- t031 c 4 INT 9 10 10 0 1
- t031 d 4 INT 9 10 10 0 1
- t031 e 4 INT 9 10 10 0 1
- t032 a 4 INT 9 10 10 0 1
- t032 b 4 INT 9 10 10 0 1
- t032 c 4 INT 9 10 10 0 1
- t032 d 4 INT 9 10 10 0 1
- t032 e 4 INT 9 10 10 0 1
- t033 a 4 INT 9 10 10 0 1
- t033 b 4 INT 9 10 10 0 1
- t033 c 4 INT 9 10 10 0 1
- t033 d 4 INT 9 10 10 0 1
- t033 e 4 INT 9 10 10 0 1
- t034 a 4 INT 9 10 10 0 1
- t034 b 4 INT 9 10 10 0 1
- t034 c 4 INT 9 10 10 0 1
- t034 d 4 INT 9 10 10 0 1
- t034 e 4 INT 9 10 10 0 1
- t035 a 4 INT 9 10 10 0 1
- t035 b 4 INT 9 10 10 0 1
- t035 c 4 INT 9 10 10 0 1
- t035 d 4 INT 9 10 10 0 1
- t035 e 4 INT 9 10 10 0 1
- t036 a 4 INT 9 10 10 0 1
- t036 b 4 INT 9 10 10 0 1
- t036 c 4 INT 9 10 10 0 1
- t036 d 4 INT 9 10 10 0 1
- t036 e 4 INT 9 10 10 0 1
- t037 a 4 INT 9 10 10 0 1
- t037 b 4 INT 9 10 10 0 1
- t037 c 4 INT 9 10 10 0 1
- t037 d 4 INT 9 10 10 0 1
- t037 e 4 INT 9 10 10 0 1
- t038 a 4 INT 9 10 10 0 1
- t038 b 4 INT 9 10 10 0 1
- t038 c 4 INT 9 10 10 0 1
- t038 d 4 INT 9 10 10 0 1
- t038 e 4 INT 9 10 10 0 1
- t039 a 4 INT 9 10 10 0 1
- t039 b 4 INT 9 10 10 0 1
- t039 c 4 INT 9 10 10 0 1
- t039 d 4 INT 9 10 10 0 1
- t039 e 4 INT 9 10 10 0 1
- t040 a 4 INT 9 10 10 0 1
- t040 b 4 INT 9 10 10 0 1
- t040 c 4 INT 9 10 10 0 1
- t040 d 4 INT 9 10 10 0 1
- t040 e 4 INT 9 10 10 0 1
- t041 a 4 INT 9 10 10 0 1
- t041 b 4 INT 9 10 10 0 1
- t041 c 4 INT 9 10 10 0 1
- t041 d 4 INT 9 10 10 0 1
- t041 e 4 INT 9 10 10 0 1
- t042 a 4 INT 9 10 10 0 1
- t042 b 4 INT 9 10 10 0 1
- t042 c 4 INT 9 10 10 0 1
- t042 d 4 INT 9 10 10 0 1
- t042 e 4 INT 9 10 10 0 1
- t043 a 4 INT 9 10 10 0 1
- t043 b 4 INT 9 10 10 0 1
- t043 c 4 INT 9 10 10 0 1
- t043 d 4 INT 9 10 10 0 1
- t043 e 4 INT 9 10 10 0 1
- t044 a 4 INT 9 10 10 0 1
- t044 b 4 INT 9 10 10 0 1
- t044 c 4 INT 9 10 10 0 1
- t044 d 4 INT 9 10 10 0 1
- t044 e 4 INT 9 10 10 0 1
- t045 a 4 INT 9 10 10 0 1
- t045 b 4 INT 9 10 10 0 1
- t045 c 4 INT 9 10 10 0 1
- t045 d 4 INT 9 10 10 0 1
- t045 e 4 INT 9 10 10 0 1
- t046 a 4 INT 9 10 10 0 1
- t046 b 4 INT 9 10 10 0 1
- t046 c 4 INT 9 10 10 0 1
- t046 d 4 INT 9 10 10 0 1
- t046 e 4 INT 9 10 10 0 1
- t047 a 4 INT 9 10 10 0 1
- t047 b 4 INT 9 10 10 0 1
- t047 c 4 INT 9 10 10 0 1
- t047 d 4 INT 9 10 10 0 1
- t047 e 4 INT 9 10 10 0 1
- t048 a 4 INT 9 10 10 0 1
- t048 b 4 INT 9 10 10 0 1
- t048 c 4 INT 9 10 10 0 1
- t048 d 4 INT 9 10 10 0 1
- t048 e 4 INT 9 10 10 0 1
- t049 a 4 INT 9 10 10 0 1
- t049 b 4 INT 9 10 10 0 1
- t049 c 4 INT 9 10 10 0 1
- t049 d 4 INT 9 10 10 0 1
- t049 e 4 INT 9 10 10 0 1
- t050 a 4 INT 9 10 10 0 1
- t050 b 4 INT 9 10 10 0 1
- t050 c 4 INT 9 10 10 0 1
- t050 d 4 INT 9 10 10 0 1
- t050 e 4 INT 9 10 10 0 1
- t051 a 4 INT 9 10 10 0 1
- t051 b 4 INT 9 10 10 0 1
- t051 c 4 INT 9 10 10 0 1
- t051 d 4 INT 9 10 10 0 1
- t051 e 4 INT 9 10 10 0 1
- t052 a 4 INT 9 10 10 0 1
- t052 b 4 INT 9 10 10 0 1
- t052 c 4 INT 9 10 10 0 1
- t052 d 4 INT 9 10 10 0 1
- t052 e 4 INT 9 10 10 0 1
- t053 a 4 INT 9 10 10 0 1
- t053 b 4 INT 9 10 10 0 1
- t053 c 4 INT 9 10 10 0 1
- t053 d 4 INT 9 10 10 0 1
- t053 e 4 INT 9 10 10 0 1
- t054 a 4 INT 9 10 10 0 1
- t054 b 4 INT 9 10 10 0 1
- t054 c 4 INT 9 10 10 0 1
- t054 d 4 INT 9 10 10 0 1
- t054 e 4 INT 9 10 10 0 1
- t055 a 4 INT 9 10 10 0 1
- t055 b 4 INT 9 10 10 0 1
- t055 c 4 INT 9 10 10 0 1
- t055 d 4 INT 9 10 10 0 1
- t055 e 4 INT 9 10 10 0 1
- t056 a 4 INT 9 10 10 0 1
- t056 b 4 INT 9 10 10 0 1
- t056 c 4 INT 9 10 10 0 1
- t056 d 4 INT 9 10 10 0 1
- t056 e 4 INT 9 10 10 0 1
- t057 a 4 INT 9 10 10 0 1
- t057 b 4 INT 9 10 10 0 1
- t057 c 4 INT 9 10 10 0 1
- t057 d 4 INT 9 10 10 0 1
- t057 e 4 INT 9 10 10 0 1
- t058 a 4 INT 9 10 10 0 1
- t058 b 4 INT 9 10 10 0 1
- t058 c 4 INT 9 10 10 0 1
- t058 d 4 INT 9 10 10 0 1
- t058 e 4 INT 9 10 10 0 1
- t059 a 4 INT 9 10 10 0 1
- t059 b 4 INT 9 10 10 0 1
- t059 c 4 INT 9 10 10 0 1
- t059 d 4 INT 9 10 10 0 1
- t059 e 4 INT 9 10 10 0 1
- t060 a 4 INT 9 10 10 0 1
- t060 b 4 INT 9 10 10 0 1
- t060 c 4 INT 9 10 10 0 1
- t060 d 4 INT 9 10 10 0 1
- t060 e 4 INT 9 10 10 0 1
- t061 a 4 INT 9 10 10 0 1
- t061 b 4 INT 9 10 10 0 1
- t061 c 4 INT 9 10 10 0 1
- t061 d 4 INT 9 10 10 0 1
- t061 e 4 INT 9 10 10 0 1
- t062 a 4 INT 9 10 10 0 1
- t062 b 4 INT 9 10 10 0 1
- t062 c 4 INT 9 10 10 0 1
- t062 d 4 INT 9 10 10 0 1
- t062 e 4 INT 9 10 10 0 1
- t063 a 4 INT 9 10 10 0 1
- t063 b 4 INT 9 10 10 0 1
- t063 c 4 INT 9 10 10 0 1
- t063 d 4 INT 9 10 10 0 1
- t063 e 4 INT 9 10 10 0 1
- t064 a 4 INT 9 10 10 0 1
- t064 b 4 INT 9 10 10 0 1
- t064 c 4 INT 9 10 10 0 1
- t064 d 4 INT 9 10 10 0 1
- t064 e 4 INT 9 10 10 0 1
- t065 a 4 INT 9 10 10 0 1
- t065 b 4 INT 9 10 10 0 1
- t065 c 4 INT 9 10 10 0 1
- t065 d 4 INT 9 10 10 0 1
- t065 e 4 INT 9 10 10 0 1
- t066 a 4 INT 9 10 10 0 1
- t066 b 4 INT 9 10 10 0 1
- t066 c 4 INT 9 10 10 0 1
- t066 d 4 INT 9 10 10 0 1
- t066 e 4 INT 9 10 10 0 1
- t067 a 4 INT 9 10 10 0 1
- t067 b 4 INT 9 10 10 0 1
- t067 c 4 INT 9 10 10 0 1
- t067 d 4 INT 9 10 10 0 1
- t067 e 4 INT 9 10 10 0 1
- t068 a 4 INT 9 10 10 0 1
- t068 b 4 INT 9 10 10 0 1
- t068 c 4 INT 9 10 10 0 1
- t068 d 4 INT 9 10 10 0 1
- t068 e 4 INT 9 10 10 0 1
- t069 a 4 INT 9 10 10 0 1
- t069 b 4 INT 9 10 10 0 1
- t069 c 4 INT 9 10 10 0 1
- t069 d 4 INT 9 10 10 0 1
- t069 e 4 INT 9 10 10 0 1
- t070 a 4 INT 9 10 10 0 1
- t070 b 4 INT 9 10 10 0 1
- t070 c 4 INT 9 10 10 0 1
- t070 d 4 INT 9 10 10 0 1
- t070 e 4 INT 9 10 10 0 1
- t071 a 4 INT 9 10 10 0 1
- t071 b 4 INT 9 10 10 0 1
- t071 c 4 INT 9 10 10 0 1
- t071 d 4 INT 9 10 10 0 1
- t071 e 4 INT 9 10 10 0 1
- t072 a 4 INT 9 10 10 0 1
- t072 b 4 INT 9 10 10 0 1
- t072 c 4 INT 9 10 10 0 1
- t072 d 4 INT 9 10 10 0 1
- t072 e 4 INT 9 10 10 0 1
- t073 a 4 INT 9 10 10 0 1
- t073 b 4 INT 9 10 10 0 1
- t073 c 4 INT 9 10 10 0 1
- t073 d 4 INT 9 10 10 0 1
- t073 e 4 INT 9 10 10 0 1
- t074 a 4 INT 9 10 10 0 1
- t074 b 4 INT 9 10 10 0 1
- t074 c 4 INT 9 10 10 0 1
- t074 d 4 INT 9 10 10 0 1
- t074 e 4 INT 9 10 10 0 1
- t075 a 4 INT 9 10 10 0 1
- t075 b 4 INT 9 10 10 0 1
- t075 c 4 INT 9 10 10 0 1
- t075 d 4 INT 9 10 10 0 1
- t075 e 4 INT 9 10 10 0 1
- t076 a 4 INT 9 10 10 0 1
- t076 b 4 INT 9 10 10 0 1
- t076 c 4 INT 9 10 10 0 1
- t076 d 4 INT 9 10 10 0 1
- t076 e 4 INT 9 10 10 0 1
- t077 a 4 INT 9 10 10 0 1
- t077 b 4 INT 9 10 10 0 1
- t077 c 4 INT 9 10 10 0 1
- t077 d 4 INT 9 10 10 0 1
- t077 e 4 INT 9 10 10 0 1
- t078 a 4 INT 9 10 10 0 1
- t078 b 4 INT 9 10 10 0 1
- t078 c 4 INT 9 10 10 0 1
- t078 d 4 INT 9 10 10 0 1
- t078 e 4 INT 9 10 10 0 1
- t079 a 4 INT 9 10 10 0 1
- t079 b 4 INT 9 10 10 0 1
- t079 c 4 INT 9 10 10 0 1
- t079 d 4 INT 9 10 10 0 1
- t079 e 4 INT 9 10 10 0 1
- t080 a 4 INT 9 10 10 0 1
- t080 b 4 INT 9 10 10 0 1
- t080 c 4 INT 9 10 10 0 1
- t080 d 4 INT 9 10 10 0 1
- t080 e 4 INT 9 10 10 0 1
- t081 a 4 INT 9 10 10 0 1
- t081 b 4 INT 9 10 10 0 1
- t081 c 4 INT 9 10 10 0 1
- t081 d 4 INT 9 10 10 0 1
- t081 e 4 INT 9 10 10 0 1
- t082 a 4 INT 9 10 10 0 1
- t082 b 4 INT 9 10 10 0 1
- t082 c 4 INT 9 10 10 0 1
- t082 d 4 INT 9 10 10 0 1
- t082 e 4 INT 9 10 10 0 1
- t083 a 4 INT 9 10 10 0 1
- t083 b 4 INT 9 10 10 0 1
- t083 c 4 INT 9 10 10 0 1
- t083 d 4 INT 9 10 10 0 1
- t083 e 4 INT 9 10 10 0 1
- t084 a 4 INT 9 10 10 0 1
- t084 b 4 INT 9 10 10 0 1
- t084 c 4 INT 9 10 10 0 1
- t084 d 4 INT 9 10 10 0 1
- t084 e 4 INT 9 10 10 0 1
- t085 a 4 INT 9 10 10 0 1
- t085 b 4 INT 9 10 10 0 1
- t085 c 4 INT 9 10 10 0 1
- t085 d 4 INT 9 10 10 0 1
- t085 e 4 INT 9 10 10 0 1
- t086 a 4 INT 9 10 10 0 1
- t086 b 4 INT 9 10 10 0 1
- t086 c 4 INT 9 10 10 0 1
- t086 d 4 INT 9 10 10 0 1
- t086 e 4 INT 9 10 10 0 1
- t087 a 4 INT 9 10 10 0 1
- t087 b 4 INT 9 10 10 0 1
- t087 c 4 INT 9 10 10 0 1
- t087 d 4 INT 9 10 10 0 1
- t087 e 4 INT 9 10 10 0 1
- t088 a 4 INT 9 10 10 0 1
- t088 b 4 INT 9 10 10 0 1
- t088 c 4 INT 9 10 10 0 1
- t088 d 4 INT 9 10 10 0 1
- t088 e 4 INT 9 10 10 0 1
- t089 a 4 INT 9 10 10 0 1
- t089 b 4 INT 9 10 10 0 1
- t089 c 4 INT 9 10 10 0 1
- t089 d 4 INT 9 10 10 0 1
- t089 e 4 INT 9 10 10 0 1
- t090 a 4 INT 9 10 10 0 1
- t090 b 4 INT 9 10 10 0 1
- t090 c 4 INT 9 10 10 0 1
- t090 d 4 INT 9 10 10 0 1
- t090 e 4 INT 9 10 10 0 1
- t091 a 4 INT 9 10 10 0 1
- t091 b 4 INT 9 10 10 0 1
- t091 c 4 INT 9 10 10 0 1
- t091 d 4 INT 9 10 10 0 1
- t091 e 4 INT 9 10 10 0 1
- t092 a 4 INT 9 10 10 0 1
- t092 b 4 INT 9 10 10 0 1
- t092 c 4 INT 9 10 10 0 1
- t092 d 4 INT 9 10 10 0 1
- t092 e 4 INT 9 10 10 0 1
- t093 a 4 INT 9 10 10 0 1
- t093 b 4 INT 9 10 10 0 1
- t093 c 4 INT 9 10 10 0 1
- t093 d 4 INT 9 10 10 0 1
- t093 e 4 INT 9 10 10 0 1
- t094 a 4 INT 9 10 10 0 1
- t094 b 4 INT 9 10 10 0 1
- t094 c 4 INT 9 10 10 0 1
- t094 d 4 INT 9 10 10 0 1
- t094 e 4 INT 9 10 10 0 1
- t095 a 4 INT 9 10 10 0 1
- t095 b 4 INT 9 10 10 0 1
- t095 c 4 INT 9 10 10 0 1
- t095 d 4 INT 9 10 10 0 1
- t095 e 4 INT 9 10 10 0 1
- t096 a 4 INT 9 10 10 0 1
- t096 b 4 INT 9 10 10 0 1
- t096 c 4 INT 9 10 10 0 1
- t096 d 4 INT 9 10 10 0 1
- t096 e 4 INT 9 10 10 0 1
- t097 a 4 INT 9 10 10 0 1
- t097 b 4 INT 9 10 10 0 1
- t097 c 4 INT 9 10 10 0 1
- t097 d 4 INT 9 10 10 0 1
- t097 e 4 INT 9 10 10 0 1
- t098 a 4 INT 9 10 10 0 1
- t098 b 4 INT 9 10 10 0 1
- t098 c 4 INT 9 10 10 0 1
- t098 d 4 INT 9 10 10 0 1
- t098 e 4 INT 9 10 10 0 1
- t099 a 4 INT 9 10 10 0 1
- t099 b 4 INT 9 10 10 0 1
- t099 c 4 INT 9 10 10 0 1
- t099 d 4 INT 9 10 10 0 1
- t099 e 4 INT 9 10 10 0 1
- t1 a 12 varchar(64) 64 64 10 0 1
- t100 a 4 INT 9 10 10 0 1
- t100 b 4 INT 9 10 10 0 1
- t100 c 4 INT 9 10 10 0 1
- t100 d 4 INT 9 10 10 0 1
- t100 e 4 INT 9 10 10 0 1
- t101 a 4 INT 9 10 10 0 1
- t101 b 4 INT 9 10 10 0 1
- t101 c 4 INT 9 10 10 0 1
- t101 d 4 INT 9 10 10 0 1
- t101 e 4 INT 9 10 10 0 1
- t102 a 4 INT 9 10 10 0 1
- t102 b 4 INT 9 10 10 0 1
- t102 c 4 INT 9 10 10 0 1
- t102 d 4 INT 9 10 10 0 1
- t102 e 4 INT 9 10 10 0 1
- t103 a 4 INT 9 10 10 0 1
- t103 b 4 INT 9 10 10 0 1
- t103 c 4 INT 9 10 10 0 1
- t103 d 4 INT 9 10 10 0 1
- t103 e 4 INT 9 10 10 0 1
- t104 a 4 INT 9 10 10 0 1
- t104 b 4 INT 9 10 10 0 1
- t104 c 4 INT 9 10 10 0 1
- t104 d 4 INT 9 10 10 0 1
- t104 e 4 INT 9 10 10 0 1
- t105 a 4 INT 9 10 10 0 1
- t105 b 4 INT 9 10 10 0 1
- t105 c 4 INT 9 10 10 0 1
- t105 d 4 INT 9 10 10 0 1
- t105 e 4 INT 9 10 10 0 1
- t106 a 4 INT 9 10 10 0 1
- t106 b 4 INT 9 10 10 0 1
- t106 c 4 INT 9 10 10 0 1
- t106 d 4 INT 9 10 10 0 1
- t106 e 4 INT 9 10 10 0 1
- t107 a 4 INT 9 10 10 0 1
- t107 b 4 INT 9 10 10 0 1
- t107 c 4 INT 9 10 10 0 1
- t107 d 4 INT 9 10 10 0 1
- t107 e 4 INT 9 10 10 0 1
- t108 a 4 INT 9 10 10 0 1
- t108 b 4 INT 9 10 10 0 1
- t108 c 4 INT 9 10 10 0 1
- t108 d 4 INT 9 10 10 0 1
- t108 e 4 INT 9 10 10 0 1
- t109 a 4 INT 9 10 10 0 1
- t109 b 4 INT 9 10 10 0 1
- t109 c 4 INT 9 10 10 0 1
- t109 d 4 INT 9 10 10 0 1
- t109 e 4 INT 9 10 10 0 1
- t110 a 4 INT 9 10 10 0 1
- t110 b 4 INT 9 10 10 0 1
- t110 c 4 INT 9 10 10 0 1
- t110 d 4 INT 9 10 10 0 1
- t110 e 4 INT 9 10 10 0 1
- t111 a 4 INT 9 10 10 0 1
- t111 b 4 INT 9 10 10 0 1
- t111 c 4 INT 9 10 10 0 1
- t111 d 4 INT 9 10 10 0 1
- t111 e 4 INT 9 10 10 0 1
- t112 a 4 INT 9 10 10 0 1
- t112 b 4 INT 9 10 10 0 1
- t112 c 4 INT 9 10 10 0 1
- t112 d 4 INT 9 10 10 0 1
- t112 e 4 INT 9 10 10 0 1
- t113 a 4 INT 9 10 10 0 1
- t113 b 4 INT 9 10 10 0 1
- t113 c 4 INT 9 10 10 0 1
- t113 d 4 INT 9 10 10 0 1
- t113 e 4 INT 9 10 10 0 1
- t114 a 4 INT 9 10 10 0 1
- t114 b 4 INT 9 10 10 0 1
- t114 c 4 INT 9 10 10 0 1
- t114 d 4 INT 9 10 10 0 1
- t114 e 4 INT 9 10 10 0 1
- t115 a 4 INT 9 10 10 0 1
- t115 b 4 INT 9 10 10 0 1
- t115 c 4 INT 9 10 10 0 1
- t115 d 4 INT 9 10 10 0 1
- t115 e 4 INT 9 10 10 0 1
- t116 a 4 INT 9 10 10 0 1
- t116 b 4 INT 9 10 10 0 1
- t116 c 4 INT 9 10 10 0 1
- t116 d 4 INT 9 10 10 0 1
- t116 e 4 INT 9 10 10 0 1
- t117 a 4 INT 9 10 10 0 1
- t117 b 4 INT 9 10 10 0 1
- t117 c 4 INT 9 10 10 0 1
- t117 d 4 INT 9 10 10 0 1
- t117 e 4 INT 9 10 10 0 1
- t118 a 4 INT 9 10 10 0 1
- t118 b 4 INT 9 10 10 0 1
- t118 c 4 INT 9 10 10 0 1
- t118 d 4 INT 9 10 10 0 1
- t118 e 4 INT 9 10 10 0 1
- t119 a 4 INT 9 10 10 0 1
- t119 b 4 INT 9 10 10 0 1
- t119 c 4 INT 9 10 10 0 1
- t119 d 4 INT 9 10 10 0 1
- t119 e 4 INT 9 10 10 0 1
- t120 a 4 INT 9 10 10 0 1
- t120 b 4 INT 9 10 10 0 1
- t120 c 4 INT 9 10 10 0 1
- t120 d 4 INT 9 10 10 0 1
- t120 e 4 INT 9 10 10 0 1
- t121 a 4 INT 9 10 10 0 1
- t121 b 4 INT 9 10 10 0 1
- t121 c 4 INT 9 10 10 0 1
- t121 d 4 INT 9 10 10 0 1
- t121 e 4 INT 9 10 10 0 1
- t122 a 4 INT 9 10 10 0 1
- t122 b 4 INT 9 10 10 0 1
- t122 c 4 INT 9 10 10 0 1
- t122 d 4 INT 9 10 10 0 1
- t122 e 4 INT 9 10 10 0 1
- t123 a 4 INT 9 10 10 0 1
- t123 b 4 INT 9 10 10 0 1
- t123 c 4 INT 9 10 10 0 1
- t123 d 4 INT 9 10 10 0 1
- t123 e 4 INT 9 10 10 0 1
- t124 a 4 INT 9 10 10 0 1
- t124 b 4 INT 9 10 10 0 1
- t124 c 4 INT 9 10 10 0 1
- t124 d 4 INT 9 10 10 0 1
- t124 e 4 INT 9 10 10 0 1
- t125 a 4 INT 9 10 10 0 1
- t125 b 4 INT 9 10 10 0 1
- t125 c 4 INT 9 10 10 0 1
- t125 d 4 INT 9 10 10 0 1
- t125 e 4 INT 9 10 10 0 1
- t126 a 4 INT 9 10 10 0 1
- t126 b 4 INT 9 10 10 0 1
- t126 c 4 INT 9 10 10 0 1
- t126 d 4 INT 9 10 10 0 1
- t126 e 4 INT 9 10 10 0 1
- t127 a 4 INT 9 10 10 0 1
- t127 b 4 INT 9 10 10 0 1
- t127 c 4 INT 9 10 10 0 1
- t127 d 4 INT 9 10 10 0 1
- t127 e 4 INT 9 10 10 0 1
- t128 a 4 INT 9 10 10 0 1
- t128 b 4 INT 9 10 10 0 1
- t128 c 4 INT 9 10 10 0 1
- t128 d 4 INT 9 10 10 0 1
- t128 e 4 INT 9 10 10 0 1
- t129 a 4 INT 9 10 10 0 1
- t129 b 4 INT 9 10 10 0 1
- t129 c 4 INT 9 10 10 0 1
- t129 d 4 INT 9 10 10 0 1
- t129 e 4 INT 9 10 10 0 1
- t130 a 4 INT 9 10 10 0 1
- t130 b 4 INT 9 10 10 0 1
- t130 c 4 INT 9 10 10 0 1
- t130 d 4 INT 9 10 10 0 1
- t130 e 4 INT 9 10 10 0 1
- t131 a 4 INT 9 10 10 0 1
- t131 b 4 INT 9 10 10 0 1
- t131 c 4 INT 9 10 10 0 1
- t131 d 4 INT 9 10 10 0 1
- t131 e 4 INT 9 10 10 0 1
- t132 a 4 INT 9 10 10 0 1
- t132 b 4 INT 9 10 10 0 1
- t132 c 4 INT 9 10 10 0 1
- t132 d 4 INT 9 10 10 0 1
- t132 e 4 INT 9 10 10 0 1
- t133 a 4 INT 9 10 10 0 1
- t133 b 4 INT 9 10 10 0 1
- t133 c 4 INT 9 10 10 0 1
- t133 d 4 INT 9 10 10 0 1
- t133 e 4 INT 9 10 10 0 1
- t134 a 4 INT 9 10 10 0 1
- t134 b 4 INT 9 10 10 0 1
- t134 c 4 INT 9 10 10 0 1
- t134 d 4 INT 9 10 10 0 1
- t134 e 4 INT 9 10 10 0 1
- t135 a 4 INT 9 10 10 0 1
- t135 b 4 INT 9 10 10 0 1
- t135 c 4 INT 9 10 10 0 1
- t135 d 4 INT 9 10 10 0 1
- t135 e 4 INT 9 10 10 0 1
- t136 a 4 INT 9 10 10 0 1
- t136 b 4 INT 9 10 10 0 1
- t136 c 4 INT 9 10 10 0 1
- t136 d 4 INT 9 10 10 0 1
- t136 e 4 INT 9 10 10 0 1
- t137 a 4 INT 9 10 10 0 1
- t137 b 4 INT 9 10 10 0 1
- t137 c 4 INT 9 10 10 0 1
- t137 d 4 INT 9 10 10 0 1
- t137 e 4 INT 9 10 10 0 1
- t138 a 4 INT 9 10 10 0 1
- t138 b 4 INT 9 10 10 0 1
- t138 c 4 INT 9 10 10 0 1
- t138 d 4 INT 9 10 10 0 1
- t138 e 4 INT 9 10 10 0 1
- t139 a 4 INT 9 10 10 0 1
- t139 b 4 INT 9 10 10 0 1
- t139 c 4 INT 9 10 10 0 1
- t139 d 4 INT 9 10 10 0 1
- t139 e 4 INT 9 10 10 0 1
- t140 a 4 INT 9 10 10 0 1
- t140 b 4 INT 9 10 10 0 1
- t140 c 4 INT 9 10 10 0 1
- t140 d 4 INT 9 10 10 0 1
- t140 e 4 INT 9 10 10 0 1
- t141 a 4 INT 9 10 10 0 1
- t141 b 4 INT 9 10 10 0 1
- t141 c 4 INT 9 10 10 0 1
- t141 d 4 INT 9 10 10 0 1
- t141 e 4 INT 9 10 10 0 1
- t142 a 4 INT 9 10 10 0 1
- t142 b 4 INT 9 10 10 0 1
- t142 c 4 INT 9 10 10 0 1
- t142 d 4 INT 9 10 10 0 1
- t142 e 4 INT 9 10 10 0 1
- t143 a 4 INT 9 10 10 0 1
- t143 b 4 INT 9 10 10 0 1
- t143 c 4 INT 9 10 10 0 1
- t143 d 4 INT 9 10 10 0 1
- t143 e 4 INT 9 10 10 0 1
- t144 a 4 INT 9 10 10 0 1
- t144 b 4 INT 9 10 10 0 1
- t144 c 4 INT 9 10 10 0 1
- t144 d 4 INT 9 10 10 0 1
- t144 e 4 INT 9 10 10 0 1
- t145 a 4 INT 9 10 10 0 1
- t145 b 4 INT 9 10 10 0 1
- t145 c 4 INT 9 10 10 0 1
- t145 d 4 INT 9 10 10 0 1
- t145 e 4 INT 9 10 10 0 1
- t146 a 4 INT 9 10 10 0 1
- t146 b 4 INT 9 10 10 0 1
- t146 c 4 INT 9 10 10 0 1
- t146 d 4 INT 9 10 10 0 1
- t146 e 4 INT 9 10 10 0 1
- t147 a 4 INT 9 10 10 0 1
- t147 b 4 INT 9 10 10 0 1
- t147 c 4 INT 9 10 10 0 1
- t147 d 4 INT 9 10 10 0 1
- t147 e 4 INT 9 10 10 0 1
- t148 a 4 INT 9 10 10 0 1
- t148 b 4 INT 9 10 10 0 1
- t148 c 4 INT 9 10 10 0 1
- t148 d 4 INT 9 10 10 0 1
- t148 e 4 INT 9 10 10 0 1
- t149 a 4 INT 9 10 10 0 1
- t149 b 4 INT 9 10 10 0 1
- t149 c 4 INT 9 10 10 0 1
- t149 d 4 INT 9 10 10 0 1
- t149 e 4 INT 9 10 10 0 1
- t150 a 4 INT 9 10 10 0 1
- t150 b 4 INT 9 10 10 0 1
- t150 c 4 INT 9 10 10 0 1
- t150 d 4 INT 9 10 10 0 1
- t150 e 4 INT 9 10 10 0 1
- t151 a 4 INT 9 10 10 0 1
- t151 b 4 INT 9 10 10 0 1
- t151 c 4 INT 9 10 10 0 1
- t151 d 4 INT 9 10 10 0 1
- t151 e 4 INT 9 10 10 0 1
- t152 a 4 INT 9 10 10 0 1
- t152 b 4 INT 9 10 10 0 1
- t152 c 4 INT 9 10 10 0 1
- t152 d 4 INT 9 10 10 0 1
- t152 e 4 INT 9 10 10 0 1
- t153 a 4 INT 9 10 10 0 1
- t153 b 4 INT 9 10 10 0 1
- t153 c 4 INT 9 10 10 0 1
- t153 d 4 INT 9 10 10 0 1
- t153 e 4 INT 9 10 10 0 1
- t154 a 4 INT 9 10 10 0 1
- t154 b 4 INT 9 10 10 0 1
- t154 c 4 INT 9 10 10 0 1
- t154 d 4 INT 9 10 10 0 1
- t154 e 4 INT 9 10 10 0 1
- t155 a 4 INT 9 10 10 0 1
- t155 b 4 INT 9 10 10 0 1
- t155 c 4 INT 9 10 10 0 1
- t155 d 4 INT 9 10 10 0 1
- t155 e 4 INT 9 10 10 0 1
- t156 a 4 INT 9 10 10 0 1
- t156 b 4 INT 9 10 10 0 1
- t156 c 4 INT 9 10 10 0 1
- t156 d 4 INT 9 10 10 0 1
- t156 e 4 INT 9 10 10 0 1
- t157 a 4 INT 9 10 10 0 1
- t157 b 4 INT 9 10 10 0 1
- t157 c 4 INT 9 10 10 0 1
- t157 d 4 INT 9 10 10 0 1
- t157 e 4 INT 9 10 10 0 1
- t158 a 4 INT 9 10 10 0 1
- t158 b 4 INT 9 10 10 0 1
- t158 c 4 INT 9 10 10 0 1
- t158 d 4 INT 9 10 10 0 1
- t158 e 4 INT 9 10 10 0 1
- t159 a 4 INT 9 10 10 0 1
- t159 b 4 INT 9 10 10 0 1
- t159 c 4 INT 9 10 10 0 1
- t159 d 4 INT 9 10 10 0 1
- t159 e 4 INT 9 10 10 0 1
- t160 a 4 INT 9 10 10 0 1
- t160 b 4 INT 9 10 10 0 1
- t160 c 4 INT 9 10 10 0 1
- t160 d 4 INT 9 10 10 0 1
- t160 e 4 INT 9 10 10 0 1
- t161 a 4 INT 9 10 10 0 1
- t161 b 4 INT 9 10 10 0 1
- t161 c 4 INT 9 10 10 0 1
- t161 d 4 INT 9 10 10 0 1
- t161 e 4 INT 9 10 10 0 1
- t162 a 4 INT 9 10 10 0 1
- t162 b 4 INT 9 10 10 0 1
- t162 c 4 INT 9 10 10 0 1
- t162 d 4 INT 9 10 10 0 1
- t162 e 4 INT 9 10 10 0 1
- t163 a 4 INT 9 10 10 0 1
- t163 b 4 INT 9 10 10 0 1
- t163 c 4 INT 9 10 10 0 1
- t163 d 4 INT 9 10 10 0 1
- t163 e 4 INT 9 10 10 0 1
- t164 a 4 INT 9 10 10 0 1
- t164 b 4 INT 9 10 10 0 1
- t164 c 4 INT 9 10 10 0 1
- t164 d 4 INT 9 10 10 0 1
- t164 e 4 INT 9 10 10 0 1
- t165 a 4 INT 9 10 10 0 1
- t165 b 4 INT 9 10 10 0 1
- t165 c 4 INT 9 10 10 0 1
- t165 d 4 INT 9 10 10 0 1
- t165 e 4 INT 9 10 10 0 1
- t166 a 4 INT 9 10 10 0 1
- t166 b 4 INT 9 10 10 0 1
- t166 c 4 INT 9 10 10 0 1
- t166 d 4 INT 9 10 10 0 1
- t166 e 4 INT 9 10 10 0 1
- t167 a 4 INT 9 10 10 0 1
- t167 b 4 INT 9 10 10 0 1
- t167 c 4 INT 9 10 10 0 1
- t167 d 4 INT 9 10 10 0 1
- t167 e 4 INT 9 10 10 0 1
- t168 a 4 INT 9 10 10 0 1
- t168 b 4 INT 9 10 10 0 1
- t168 c 4 INT 9 10 10 0 1
- t168 d 4 INT 9 10 10 0 1
- t168 e 4 INT 9 10 10 0 1
- t169 a 4 INT 9 10 10 0 1
- t169 b 4 INT 9 10 10 0 1
- t169 c 4 INT 9 10 10 0 1
- t169 d 4 INT 9 10 10 0 1
- t169 e 4 INT 9 10 10 0 1
- t170 a 4 INT 9 10 10 0 1
- t170 b 4 INT 9 10 10 0 1
- t170 c 4 INT 9 10 10 0 1
- t170 d 4 INT 9 10 10 0 1
- t170 e 4 INT 9 10 10 0 1
- t171 a 4 INT 9 10 10 0 1
- t171 b 4 INT 9 10 10 0 1
- t171 c 4 INT 9 10 10 0 1
- t171 d 4 INT 9 10 10 0 1
- t171 e 4 INT 9 10 10 0 1
- t172 a 4 INT 9 10 10 0 1
- t172 b 4 INT 9 10 10 0 1
- t172 c 4 INT 9 10 10 0 1
- t172 d 4 INT 9 10 10 0 1
- t172 e 4 INT 9 10 10 0 1
- t173 a 4 INT 9 10 10 0 1
- t173 b 4 INT 9 10 10 0 1
- t173 c 4 INT 9 10 10 0 1
- t173 d 4 INT 9 10 10 0 1
- t173 e 4 INT 9 10 10 0 1
- t174 a 4 INT 9 10 10 0 1
- t174 b 4 INT 9 10 10 0 1
- t174 c 4 INT 9 10 10 0 1
- t174 d 4 INT 9 10 10 0 1
- t174 e 4 INT 9 10 10 0 1
- t175 a 4 INT 9 10 10 0 1
- t175 b 4 INT 9 10 10 0 1
- t175 c 4 INT 9 10 10 0 1
- t175 d 4 INT 9 10 10 0 1
- t175 e 4 INT 9 10 10 0 1
- t176 a 4 INT 9 10 10 0 1
- t176 b 4 INT 9 10 10 0 1
- t176 c 4 INT 9 10 10 0 1
- t176 d 4 INT 9 10 10 0 1
- t176 e 4 INT 9 10 10 0 1
- t177 a 4 INT 9 10 10 0 1
- t177 b 4 INT 9 10 10 0 1
- t177 c 4 INT 9 10 10 0 1
- t177 d 4 INT 9 10 10 0 1
- t177 e 4 INT 9 10 10 0 1
- t178 a 4 INT 9 10 10 0 1
- t178 b 4 INT 9 10 10 0 1
- t178 c 4 INT 9 10 10 0 1
- t178 d 4 INT 9 10 10 0 1
- t178 e 4 INT 9 10 10 0 1
- t179 a 4 INT 9 10 10 0 1
- t179 b 4 INT 9 10 10 0 1
- t179 c 4 INT 9 10 10 0 1
- t179 d 4 INT 9 10 10 0 1
- t179 e 4 INT 9 10 10 0 1
- t180 a 4 INT 9 10 10 0 1
- t180 b 4 INT 9 10 10 0 1
- t180 c 4 INT 9 10 10 0 1
- t180 d 4 INT 9 10 10 0 1
- t180 e 4 INT 9 10 10 0 1
- t181 a 4 INT 9 10 10 0 1
- t181 b 4 INT 9 10 10 0 1
- t181 c 4 INT 9 10 10 0 1
- t181 d 4 INT 9 10 10 0 1
- t181 e 4 INT 9 10 10 0 1
- t182 a 4 INT 9 10 10 0 1
- t182 b 4 INT 9 10 10 0 1
- t182 c 4 INT 9 10 10 0 1
- t182 d 4 INT 9 10 10 0 1
- t182 e 4 INT 9 10 10 0 1
- t183 a 4 INT 9 10 10 0 1
- t183 b 4 INT 9 10 10 0 1
- t183 c 4 INT 9 10 10 0 1
- t183 d 4 INT 9 10 10 0 1
- t183 e 4 INT 9 10 10 0 1
- t184 a 4 INT 9 10 10 0 1
- t184 b 4 INT 9 10 10 0 1
- t184 c 4 INT 9 10 10 0 1
- t184 d 4 INT 9 10 10 0 1
- t184 e 4 INT 9 10 10 0 1
- t185 a 4 INT 9 10 10 0 1
- t185 b 4 INT 9 10 10 0 1
- t185 c 4 INT 9 10 10 0 1
- t185 d 4 INT 9 10 10 0 1
- t185 e 4 INT 9 10 10 0 1
- t186 a 4 INT 9 10 10 0 1
- t186 b 4 INT 9 10 10 0 1
- t186 c 4 INT 9 10 10 0 1
- t186 d 4 INT 9 10 10 0 1
- t186 e 4 INT 9 10 10 0 1
- t187 a 4 INT 9 10 10 0 1
- t187 b 4 INT 9 10 10 0 1
- t187 c 4 INT 9 10 10 0 1
- t187 d 4 INT 9 10 10 0 1
- t187 e 4 INT 9 10 10 0 1
- t188 a 4 INT 9 10 10 0 1
- t188 b 4 INT 9 10 10 0 1
- t188 c 4 INT 9 10 10 0 1
- t188 d 4 INT 9 10 10 0 1
- t188 e 4 INT 9 10 10 0 1
- t189 a 4 INT 9 10 10 0 1
- t189 b 4 INT 9 10 10 0 1
- t189 c 4 INT 9 10 10 0 1
- t189 d 4 INT 9 10 10 0 1
- t189 e 4 INT 9 10 10 0 1
- t190 a 4 INT 9 10 10 0 1
- t190 b 4 INT 9 10 10 0 1
- t190 c 4 INT 9 10 10 0 1
- t190 d 4 INT 9 10 10 0 1
- t190 e 4 INT 9 10 10 0 1
- t191 a 4 INT 9 10 10 0 1
- t191 b 4 INT 9 10 10 0 1
- t191 c 4 INT 9 10 10 0 1
- t191 d 4 INT 9 10 10 0 1
- t191 e 4 INT 9 10 10 0 1
- t192 a 4 INT 9 10 10 0 1
- t192 b 4 INT 9 10 10 0 1
- t192 c 4 INT 9 10 10 0 1
- t192 d 4 INT 9 10 10 0 1
- t192 e 4 INT 9 10 10 0 1
- t193 a 4 INT 9 10 10 0 1
- t193 b 4 INT 9 10 10 0 1
- t193 c 4 INT 9 10 10 0 1
- t193 d 4 INT 9 10 10 0 1
- t193 e 4 INT 9 10 10 0 1
- t194 a 4 INT 9 10 10 0 1
- t194 b 4 INT 9 10 10 0 1
- t194 c 4 INT 9 10 10 0 1
- t194 d 4 INT 9 10 10 0 1
- t194 e 4 INT 9 10 10 0 1
- t195 a 4 INT 9 10 10 0 1
- t195 b 4 INT 9 10 10 0 1
- t195 c 4 INT 9 10 10 0 1
- t195 d 4 INT 9 10 10 0 1
- t195 e 4 INT 9 10 10 0 1
- t196 a 4 INT 9 10 10 0 1
- t196 b 4 INT 9 10 10 0 1
- t196 c 4 INT 9 10 10 0 1
- t196 d 4 INT 9 10 10 0 1
- t196 e 4 INT 9 10 10 0 1
- t197 a 4 INT 9 10 10 0 1
- t197 b 4 INT 9 10 10 0 1
- t197 c 4 INT 9 10 10 0 1
- t197 d 4 INT 9 10 10 0 1
- t197 e 4 INT 9 10 10 0 1
- t198 a 4 INT 9 10 10 0 1
- t198 b 4 INT 9 10 10 0 1
- t198 c 4 INT 9 10 10 0 1
- t198 d 4 INT 9 10 10 0 1
- t198 e 4 INT 9 10 10 0 1
- t199 a 4 INT 9 10 10 0 1
- t199 b 4 INT 9 10 10 0 1
- t199 c 4 INT 9 10 10 0 1
- t199 d 4 INT 9 10 10 0 1
- t199 e 4 INT 9 10 10 0 1
- t200 a 4 INT 9 10 10 0 1
- t200 b 4 INT 9 10 10 0 1
- t200 c 4 INT 9 10 10 0 1
- t200 d 4 INT 9 10 10 0 1
- t200 e 4 INT 9 10 10 0 1
- t201 a 4 INT 9 10 10 0 1
- t201 b 4 INT 9 10 10 0 1
- t201 c 4 INT 9 10 10 0 1
- t201 d 4 INT 9 10 10 0 1
- t201 e 4 INT 9 10 10 0 1
- t202 a 4 INT 9 10 10 0 1
- t202 b 4 INT 9 10 10 0 1
- t202 c 4 INT 9 10 10 0 1
- t202 d 4 INT 9 10 10 0 1
- t202 e 4 INT 9 10 10 0 1
- t203 a 4 INT 9 10 10 0 1
- t203 b 4 INT 9 10 10 0 1
- t203 c 4 INT 9 10 10 0 1
- t203 d 4 INT 9 10 10 0 1
- t203 e 4 INT 9 10 10 0 1
- t204 a 4 INT 9 10 10 0 1
- t204 b 4 INT 9 10 10 0 1
- t204 c 4 INT 9 10 10 0 1
- t204 d 4 INT 9 10 10 0 1
- t204 e 4 INT 9 10 10 0 1
- t205 a 4 INT 9 10 10 0 1
- t205 b 4 INT 9 10 10 0 1
- t205 c 4 INT 9 10 10 0 1
- t205 d 4 INT 9 10 10 0 1
- t205 e 4 INT 9 10 10 0 1
- t206 a 4 INT 9 10 10 0 1
- t206 b 4 INT 9 10 10 0 1
- t206 c 4 INT 9 10 10 0 1
- t206 d 4 INT 9 10 10 0 1
- t206 e 4 INT 9 10 10 0 1
- t207 a 4 INT 9 10 10 0 1
- t207 b 4 INT 9 10 10 0 1
- t207 c 4 INT 9 10 10 0 1
- t207 d 4 INT 9 10 10 0 1
- t207 e 4 INT 9 10 10 0 1
- t208 a 4 INT 9 10 10 0 1
- t208 b 4 INT 9 10 10 0 1
- t208 c 4 INT 9 10 10 0 1
- t208 d 4 INT 9 10 10 0 1
- t208 e 4 INT 9 10 10 0 1
- t209 a 4 INT 9 10 10 0 1
- t209 b 4 INT 9 10 10 0 1
- t209 c 4 INT 9 10 10 0 1
- t209 d 4 INT 9 10 10 0 1
- t209 e 4 INT 9 10 10 0 1
- t210 a 4 INT 9 10 10 0 1
- t210 b 4 INT 9 10 10 0 1
- t210 c 4 INT 9 10 10 0 1
- t210 d 4 INT 9 10 10 0 1
- t210 e 4 INT 9 10 10 0 1
- t211 a 4 INT 9 10 10 0 1
- t211 b 4 INT 9 10 10 0 1
- t211 c 4 INT 9 10 10 0 1
- t211 d 4 INT 9 10 10 0 1
- t211 e 4 INT 9 10 10 0 1
- t212 a 4 INT 9 10 10 0 1
- t212 b 4 INT 9 10 10 0 1
- t212 c 4 INT 9 10 10 0 1
- t212 d 4 INT 9 10 10 0 1
- t212 e 4 INT 9 10 10 0 1
- t213 a 4 INT 9 10 10 0 1
- t213 b 4 INT 9 10 10 0 1
- t213 c 4 INT 9 10 10 0 1
- t213 d 4 INT 9 10 10 0 1
- t213 e 4 INT 9 10 10 0 1
- t214 a 4 INT 9 10 10 0 1
- t214 b 4 INT 9 10 10 0 1
- t214 c 4 INT 9 10 10 0 1
- t214 d 4 INT 9 10 10 0 1
- t214 e 4 INT 9 10 10 0 1
- t215 a 4 INT 9 10 10 0 1
- t215 b 4 INT 9 10 10 0 1
- t215 c 4 INT 9 10 10 0 1
- t215 d 4 INT 9 10 10 0 1
- t215 e 4 INT 9 10 10 0 1
- t216 a 4 INT 9 10 10 0 1
- t216 b 4 INT 9 10 10 0 1
- t216 c 4 INT 9 10 10 0 1
- t216 d 4 INT 9 10 10 0 1
- t216 e 4 INT 9 10 10 0 1
- t217 a 4 INT 9 10 10 0 1
- t217 b 4 INT 9 10 10 0 1
- t217 c 4 INT 9 10 10 0 1
- t217 d 4 INT 9 10 10 0 1
- t217 e 4 INT 9 10 10 0 1
- t218 a 4 INT 9 10 10 0 1
- t218 b 4 INT 9 10 10 0 1
- t218 c 4 INT 9 10 10 0 1
- t218 d 4 INT 9 10 10 0 1
- t218 e 4 INT 9 10 10 0 1
- t219 a 4 INT 9 10 10 0 1
- t219 b 4 INT 9 10 10 0 1
- t219 c 4 INT 9 10 10 0 1
- t219 d 4 INT 9 10 10 0 1
- t219 e 4 INT 9 10 10 0 1
- t220 a 4 INT 9 10 10 0 1
- t220 b 4 INT 9 10 10 0 1
- t220 c 4 INT 9 10 10 0 1
- t220 d 4 INT 9 10 10 0 1
- t220 e 4 INT 9 10 10 0 1
- t221 a 4 INT 9 10 10 0 1
- t221 b 4 INT 9 10 10 0 1
- t221 c 4 INT 9 10 10 0 1
- t221 d 4 INT 9 10 10 0 1
- t221 e 4 INT 9 10 10 0 1
- t222 a 4 INT 9 10 10 0 1
- t222 b 4 INT 9 10 10 0 1
- t222 c 4 INT 9 10 10 0 1
- t222 d 4 INT 9 10 10 0 1
- t222 e 4 INT 9 10 10 0 1
- t223 a 4 INT 9 10 10 0 1
- t223 b 4 INT 9 10 10 0 1
- t223 c 4 INT 9 10 10 0 1
- t223 d 4 INT 9 10 10 0 1
- t223 e 4 INT 9 10 10 0 1
- t224 a 4 INT 9 10 10 0 1
- t224 b 4 INT 9 10 10 0 1
- t224 c 4 INT 9 10 10 0 1
- t224 d 4 INT 9 10 10 0 1
- t224 e 4 INT 9 10 10 0 1
- t225 a 4 INT 9 10 10 0 1
- t225 b 4 INT 9 10 10 0 1
- t225 c 4 INT 9 10 10 0 1
- t225 d 4 INT 9 10 10 0 1
- t225 e 4 INT 9 10 10 0 1
- t226 a 4 INT 9 10 10 0 1
- t226 b 4 INT 9 10 10 0 1
- t226 c 4 INT 9 10 10 0 1
- t226 d 4 INT 9 10 10 0 1
- t226 e 4 INT 9 10 10 0 1
- t227 a 4 INT 9 10 10 0 1
- t227 b 4 INT 9 10 10 0 1
- t227 c 4 INT 9 10 10 0 1
- t227 d 4 INT 9 10 10 0 1
- t227 e 4 INT 9 10 10 0 1
- t228 a 4 INT 9 10 10 0 1
- t228 b 4 INT 9 10 10 0 1
- t228 c 4 INT 9 10 10 0 1
- t228 d 4 INT 9 10 10 0 1
- t228 e 4 INT 9 10 10 0 1
- t229 a 4 INT 9 10 10 0 1
- t229 b 4 INT 9 10 10 0 1
- t229 c 4 INT 9 10 10 0 1
- t229 d 4 INT 9 10 10 0 1
- t229 e 4 INT 9 10 10 0 1
- t230 a 4 INT 9 10 10 0 1
- t230 b 4 INT 9 10 10 0 1
- t230 c 4 INT 9 10 10 0 1
- t230 d 4 INT 9 10 10 0 1
- t230 e 4 INT 9 10 10 0 1
- t231 a 4 INT 9 10 10 0 1
- t231 b 4 INT 9 10 10 0 1
- t231 c 4 INT 9 10 10 0 1
- t231 d 4 INT 9 10 10 0 1
- t231 e 4 INT 9 10 10 0 1
- t232 a 4 INT 9 10 10 0 1
- t232 b 4 INT 9 10 10 0 1
- t232 c 4 INT 9 10 10 0 1
- t232 d 4 INT 9 10 10 0 1
- t232 e 4 INT 9 10 10 0 1
- t233 a 4 INT 9 10 10 0 1
- t233 b 4 INT 9 10 10 0 1
- t233 c 4 INT 9 10 10 0 1
- t233 d 4 INT 9 10 10 0 1
- t233 e 4 INT 9 10 10 0 1
- t234 a 4 INT 9 10 10 0 1
- t234 b 4 INT 9 10 10 0 1
- t234 c 4 INT 9 10 10 0 1
- t234 d 4 INT 9 10 10 0 1
- t234 e 4 INT 9 10 10 0 1
- t235 a 4 INT 9 10 10 0 1
- t235 b 4 INT 9 10 10 0 1
- t235 c 4 INT 9 10 10 0 1
- t235 d 4 INT 9 10 10 0 1
- t235 e 4 INT 9 10 10 0 1
- t236 a 4 INT 9 10 10 0 1
- t236 b 4 INT 9 10 10 0 1
- t236 c 4 INT 9 10 10 0 1
- t236 d 4 INT 9 10 10 0 1
- t236 e 4 INT 9 10 10 0 1
- t237 a 4 INT 9 10 10 0 1
- t237 b 4 INT 9 10 10 0 1
- t237 c 4 INT 9 10 10 0 1
- t237 d 4 INT 9 10 10 0 1
- t237 e 4 INT 9 10 10 0 1
- t238 a 4 INT 9 10 10 0 1
- t238 b 4 INT 9 10 10 0 1
- t238 c 4 INT 9 10 10 0 1
- t238 d 4 INT 9 10 10 0 1
- t238 e 4 INT 9 10 10 0 1
- t239 a 4 INT 9 10 10 0 1
- t239 b 4 INT 9 10 10 0 1
- t239 c 4 INT 9 10 10 0 1
- t239 d 4 INT 9 10 10 0 1
- t239 e 4 INT 9 10 10 0 1
- t240 a 4 INT 9 10 10 0 1
- t240 b 4 INT 9 10 10 0 1
- t240 c 4 INT 9 10 10 0 1
- t240 d 4 INT 9 10 10 0 1
- t240 e 4 INT 9 10 10 0 1
- t241 a 4 INT 9 10 10 0 1
- t241 b 4 INT 9 10 10 0 1
- t241 c 4 INT 9 10 10 0 1
- t241 d 4 INT 9 10 10 0 1
- t241 e 4 INT 9 10 10 0 1
- t242 a 4 INT 9 10 10 0 1
- t242 b 4 INT 9 10 10 0 1
- t242 c 4 INT 9 10 10 0 1
- t242 d 4 INT 9 10 10 0 1
- t242 e 4 INT 9 10 10 0 1
- t243 a 4 INT 9 10 10 0 1
- t243 b 4 INT 9 10 10 0 1
- t243 c 4 INT 9 10 10 0 1
- t243 d 4 INT 9 10 10 0 1
- t243 e 4 INT 9 10 10 0 1
- t244 a 4 INT 9 10 10 0 1
- t244 b 4 INT 9 10 10 0 1
- t244 c 4 INT 9 10 10 0 1
- t244 d 4 INT 9 10 10 0 1
- t244 e 4 INT 9 10 10 0 1
- t245 a 4 INT 9 10 10 0 1
- t245 b 4 INT 9 10 10 0 1
- t245 c 4 INT 9 10 10 0 1
- t245 d 4 INT 9 10 10 0 1
- t245 e 4 INT 9 10 10 0 1
- t246 a 4 INT 9 10 10 0 1
- t246 b 4 INT 9 10 10 0 1
- t246 c 4 INT 9 10 10 0 1
- t246 d 4 INT 9 10 10 0 1
- t246 e 4 INT 9 10 10 0 1
- t247 a 4 INT 9 10 10 0 1
- t247 b 4 INT 9 10 10 0 1
- t247 c 4 INT 9 10 10 0 1
- t247 d 4 INT 9 10 10 0 1
- t247 e 4 INT 9 10 10 0 1
- t248 a 4 INT 9 10 10 0 1
- t248 b 4 INT 9 10 10 0 1
- t248 c 4 INT 9 10 10 0 1
- t248 d 4 INT 9 10 10 0 1
- t248 e 4 INT 9 10 10 0 1
- t249 a 4 INT 9 10 10 0 1
- t249 b 4 INT 9 10 10 0 1
- t249 c 4 INT 9 10 10 0 1
- t249 d 4 INT 9 10 10 0 1
- t249 e 4 INT 9 10 10 0 1
- t250 a 4 INT 9 10 10 0 1
- t250 b 4 INT 9 10 10 0 1
- t250 c 4 INT 9 10 10 0 1
- t250 d 4 INT 9 10 10 0 1
- t250 e 4 INT 9 10 10 0 1
- t251 a 4 INT 9 10 10 0 1
- t251 b 4 INT 9 10 10 0 1
- t251 c 4 INT 9 10 10 0 1
- t251 d 4 INT 9 10 10 0 1
- t251 e 4 INT 9 10 10 0 1
- t252 a 4 INT 9 10 10 0 1
- t252 b 4 INT 9 10 10 0 1
- t252 c 4 INT 9 10 10 0 1
- t252 d 4 INT 9 10 10 0 1
- t252 e 4 INT 9 10 10 0 1
- t253 a 4 INT 9 10 10 0 1
- t253 b 4 INT 9 10 10 0 1
- t253 c 4 INT 9 10 10 0 1
- t253 d 4 INT 9 10 10 0 1
- t253 e 4 INT 9 10 10 0 1
- t254 a 4 INT 9 10 10 0 1
- t254 b 4 INT 9 10 10 0 1
- t254 c 4 INT 9 10 10 0 1
- t254 d 4 INT 9 10 10 0 1
- t254 e 4 INT 9 10 10 0 1
- t255 a 4 INT 9 10 10 0 1
- t255 b 4 INT 9 10 10 0 1
- t255 c 4 INT 9 10 10 0 1
- t255 d 4 INT 9 10 10 0 1
- t255 e 4 INT 9 10 10 0 1
- t256 a 4 INT 9 10 10 0 1
- t256 b 4 INT 9 10 10 0 1
- t256 c 4 INT 9 10 10 0 1
- t256 d 4 INT 9 10 10 0 1
- t256 e 4 INT 9 10 10 0 1
- t257 a 4 INT 9 10 10 0 1
- t257 b 4 INT 9 10 10 0 1
- t257 c 4 INT 9 10 10 0 1
- t257 d 4 INT 9 10 10 0 1
- t257 e 4 INT 9 10 10 0 1
- t258 a 4 INT 9 10 10 0 1
- t258 b 4 INT 9 10 10 0 1
- t258 c 4 INT 9 10 10 0 1
- t258 d 4 INT 9 10 10 0 1
- t258 e 4 INT 9 10 10 0 1
- t259 a 4 INT 9 10 10 0 1
- t259 b 4 INT 9 10 10 0 1
- t259 c 4 INT 9 10 10 0 1
- t259 d 4 INT 9 10 10 0 1
- t259 e 4 INT 9 10 10 0 1
- t260 a 4 INT 9 10 10 0 1
- t260 b 4 INT 9 10 10 0 1
- t260 c 4 INT 9 10 10 0 1
- t260 d 4 INT 9 10 10 0 1
- t260 e 4 INT 9 10 10 0 1
- t261 a 4 INT 9 10 10 0 1
- t261 b 4 INT 9 10 10 0 1
- t261 c 4 INT 9 10 10 0 1
- t261 d 4 INT 9 10 10 0 1
- t261 e 4 INT 9 10 10 0 1
- t262 a 4 INT 9 10 10 0 1
- t262 b 4 INT 9 10 10 0 1
- t262 c 4 INT 9 10 10 0 1
- t262 d 4 INT 9 10 10 0 1
- t262 e 4 INT 9 10 10 0 1
- t263 a 4 INT 9 10 10 0 1
- t263 b 4 INT 9 10 10 0 1
- t263 c 4 INT 9 10 10 0 1
- t263 d 4 INT 9 10 10 0 1
- t263 e 4 INT 9 10 10 0 1
- t264 a 4 INT 9 10 10 0 1
- t264 b 4 INT 9 10 10 0 1
- t264 c 4 INT 9 10 10 0 1
- t264 d 4 INT 9 10 10 0 1
- t264 e 4 INT 9 10 10 0 1
- t265 a 4 INT 9 10 10 0 1
- t265 b 4 INT 9 10 10 0 1
- t265 c 4 INT 9 10 10 0 1
- t265 d 4 INT 9 10 10 0 1
- t265 e 4 INT 9 10 10 0 1
- t266 a 4 INT 9 10 10 0 1
- t266 b 4 INT 9 10 10 0 1
- t266 c 4 INT 9 10 10 0 1
- t266 d 4 INT 9 10 10 0 1
- t266 e 4 INT 9 10 10 0 1
- t267 a 4 INT 9 10 10 0 1
- t267 b 4 INT 9 10 10 0 1
- t267 c 4 INT 9 10 10 0 1
- t267 d 4 INT 9 10 10 0 1
- t267 e 4 INT 9 10 10 0 1
- t268 a 4 INT 9 10 10 0 1
- t268 b 4 INT 9 10 10 0 1
- t268 c 4 INT 9 10 10 0 1
- t268 d 4 INT 9 10 10 0 1
- t268 e 4 INT 9 10 10 0 1
- t269 a 4 INT 9 10 10 0 1
- t269 b 4 INT 9 10 10 0 1
- t269 c 4 INT 9 10 10 0 1
- t269 d 4 INT 9 10 10 0 1
- t269 e 4 INT 9 10 10 0 1
- t270 a 4 INT 9 10 10 0 1
- t270 b 4 INT 9 10 10 0 1
- t270 c 4 INT 9 10 10 0 1
- t270 d 4 INT 9 10 10 0 1
- t270 e 4 INT 9 10 10 0 1
- t271 a 4 INT 9 10 10 0 1
- t271 b 4 INT 9 10 10 0 1
- t271 c 4 INT 9 10 10 0 1
- t271 d 4 INT 9 10 10 0 1
- t271 e 4 INT 9 10 10 0 1
- t272 a 4 INT 9 10 10 0 1
- t272 b 4 INT 9 10 10 0 1
- t272 c 4 INT 9 10 10 0 1
- t272 d 4 INT 9 10 10 0 1
- t272 e 4 INT 9 10 10 0 1
- t273 a 4 INT 9 10 10 0 1
- t273 b 4 INT 9 10 10 0 1
- t273 c 4 INT 9 10 10 0 1
- t273 d 4 INT 9 10 10 0 1
- t273 e 4 INT 9 10 10 0 1
- t274 a 4 INT 9 10 10 0 1
- t274 b 4 INT 9 10 10 0 1
- t274 c 4 INT 9 10 10 0 1
- t274 d 4 INT 9 10 10 0 1
- t274 e 4 INT 9 10 10 0 1
- t275 a 4 INT 9 10 10 0 1
- t275 b 4 INT 9 10 10 0 1
- t275 c 4 INT 9 10 10 0 1
- t275 d 4 INT 9 10 10 0 1
- t275 e 4 INT 9 10 10 0 1
- t276 a 4 INT 9 10 10 0 1
- t276 b 4 INT 9 10 10 0 1
- t276 c 4 INT 9 10 10 0 1
- t276 d 4 INT 9 10 10 0 1
- t276 e 4 INT 9 10 10 0 1
- t277 a 4 INT 9 10 10 0 1
- t277 b 4 INT 9 10 10 0 1
- t277 c 4 INT 9 10 10 0 1
- t277 d 4 INT 9 10 10 0 1
- t277 e 4 INT 9 10 10 0 1
- t278 a 4 INT 9 10 10 0 1
- t278 b 4 INT 9 10 10 0 1
- t278 c 4 INT 9 10 10 0 1
- t278 d 4 INT 9 10 10 0 1
- t278 e 4 INT 9 10 10 0 1
- t279 a 4 INT 9 10 10 0 1
- t279 b 4 INT 9 10 10 0 1
- t279 c 4 INT 9 10 10 0 1
- t279 d 4 INT 9 10 10 0 1
- t279 e 4 INT 9 10 10 0 1
- t280 a 4 INT 9 10 10 0 1
- t280 b 4 INT 9 10 10 0 1
- t280 c 4 INT 9 10 10 0 1
- t280 d 4 INT 9 10 10 0 1
- t280 e 4 INT 9 10 10 0 1
- t281 a 4 INT 9 10 10 0 1
- t281 b 4 INT 9 10 10 0 1
- t281 c 4 INT 9 10 10 0 1
- t281 d 4 INT 9 10 10 0 1
- t281 e 4 INT 9 10 10 0 1
- t282 a 4 INT 9 10 10 0 1
- t282 b 4 INT 9 10 10 0 1
- t282 c 4 INT 9 10 10 0 1
- t282 d 4 INT 9 10 10 0 1
- t282 e 4 INT 9 10 10 0 1
- t283 a 4 INT 9 10 10 0 1
- t283 b 4 INT 9 10 10 0 1
- t283 c 4 INT 9 10 10 0 1
- t283 d 4 INT 9 10 10 0 1
- t283 e 4 INT 9 10 10 0 1
- t284 a 4 INT 9 10 10 0 1
- t284 b 4 INT 9 10 10 0 1
- t284 c 4 INT 9 10 10 0 1
- t284 d 4 INT 9 10 10 0 1
- t284 e 4 INT 9 10 10 0 1
- t285 a 4 INT 9 10 10 0 1
- t285 b 4 INT 9 10 10 0 1
- t285 c 4 INT 9 10 10 0 1
- t285 d 4 INT 9 10 10 0 1
- t285 e 4 INT 9 10 10 0 1
- t286 a 4 INT 9 10 10 0 1
- t286 b 4 INT 9 10 10 0 1
- t286 c 4 INT 9 10 10 0 1
- t286 d 4 INT 9 10 10 0 1
- t286 e 4 INT 9 10 10 0 1
- t287 a 4 INT 9 10 10 0 1
- t287 b 4 INT 9 10 10 0 1
- t287 c 4 INT 9 10 10 0 1
- t287 d 4 INT 9 10 10 0 1
- t287 e 4 INT 9 10 10 0 1
- t288 a 4 INT 9 10 10 0 1
- t288 b 4 INT 9 10 10 0 1
- t288 c 4 INT 9 10 10 0 1
- t288 d 4 INT 9 10 10 0 1
- t288 e 4 INT 9 10 10 0 1
- t289 a 4 INT 9 10 10 0 1
- t289 b 4 INT 9 10 10 0 1
- t289 c 4 INT 9 10 10 0 1
- t289 d 4 INT 9 10 10 0 1
- t289 e 4 INT 9 10 10 0 1
- t290 a 4 INT 9 10 10 0 1
- t290 b 4 INT 9 10 10 0 1
- t290 c 4 INT 9 10 10 0 1
- t290 d 4 INT 9 10 10 0 1
- t290 e 4 INT 9 10 10 0 1
- t291 a 4 INT 9 10 10 0 1
- t291 b 4 INT 9 10 10 0 1
- t291 c 4 INT 9 10 10 0 1
- t291 d 4 INT 9 10 10 0 1
- t291 e 4 INT 9 10 10 0 1
- t292 a 4 INT 9 10 10 0 1
- t292 b 4 INT 9 10 10 0 1
- t292 c 4 INT 9 10 10 0 1
- t292 d 4 INT 9 10 10 0 1
- t292 e 4 INT 9 10 10 0 1
- t293 a 4 INT 9 10 10 0 1
- t293 b 4 INT 9 10 10 0 1
- t293 c 4 INT 9 10 10 0 1
- t293 d 4 INT 9 10 10 0 1
- t293 e 4 INT 9 10 10 0 1
- t294 a 4 INT 9 10 10 0 1
- t294 b 4 INT 9 10 10 0 1
- t294 c 4 INT 9 10 10 0 1
- t294 d 4 INT 9 10 10 0 1
- t294 e 4 INT 9 10 10 0 1
- t295 a 4 INT 9 10 10 0 1
- t295 b 4 INT 9 10 10 0 1
- t295 c 4 INT 9 10 10 0 1
- t295 d 4 INT 9 10 10 0 1
- t295 e 4 INT 9 10 10 0 1
- t296 a 4 INT 9 10 10 0 1
- t296 b 4 INT 9 10 10 0 1
- t296 c 4 INT 9 10 10 0 1
- t296 d 4 INT 9 10 10 0 1
- t296 e 4 INT 9 10 10 0 1
- t297 a 4 INT 9 10 10 0 1
- t297 b 4 INT 9 10 10 0 1
- t297 c 4 INT 9 10 10 0 1
- t297 d 4 INT 9 10 10 0 1
- t297 e 4 INT 9 10 10 0 1
- t298 a 4 INT 9 10 10 0 1
- t298 b 4 INT 9 10 10 0 1
- t298 c 4 INT 9 10 10 0 1
- t298 d 4 INT 9 10 10 0 1
- t298 e 4 INT 9 10 10 0 1
- t299 a 4 INT 9 10 10 0 1
- t299 b 4 INT 9 10 10 0 1
- t299 c 4 INT 9 10 10 0 1
- t299 d 4 INT 9 10 10 0 1
- t299 e 4 INT 9 10 10 0 1
- t300 a 4 INT 9 10 10 0 1
- t300 b 4 INT 9 10 10 0 1
- t300 c 4 INT 9 10 10 0 1
- t300 d 4 INT 9 10 10 0 1
- t300 e 4 INT 9 10 10 0 1
- t301 a 4 INT 9 10 10 0 1
- t301 b 4 INT 9 10 10 0 1
- t301 c 4 INT 9 10 10 0 1
- t301 d 4 INT 9 10 10 0 1
- t301 e 4 INT 9 10 10 0 1
- t302 a 4 INT 9 10 10 0 1
- t302 b 4 INT 9 10 10 0 1
- t302 c 4 INT 9 10 10 0 1
- t302 d 4 INT 9 10 10 0 1
- t302 e 4 INT 9 10 10 0 1
- t303 a 4 INT 9 10 10 0 1
- t303 b 4 INT 9 10 10 0 1
- t303 c 4 INT 9 10 10 0 1
- t303 d 4 INT 9 10 10 0 1
- t303 e 4 INT 9 10 10 0 1
- t304 a 4 INT 9 10 10 0 1
- t304 b 4 INT 9 10 10 0 1
- t304 c 4 INT 9 10 10 0 1
- t304 d 4 INT 9 10 10 0 1
- t304 e 4 INT 9 10 10 0 1
- t305 a 4 INT 9 10 10 0 1
- t305 b 4 INT 9 10 10 0 1
- t305 c 4 INT 9 10 10 0 1
- t305 d 4 INT 9 10 10 0 1
- t305 e 4 INT 9 10 10 0 1
- t306 a 4 INT 9 10 10 0 1
- t306 b 4 INT 9 10 10 0 1
- t306 c 4 INT 9 10 10 0 1
- t306 d 4 INT 9 10 10 0 1
- t306 e 4 INT 9 10 10 0 1
- t307 a 4 INT 9 10 10 0 1
- t307 b 4 INT 9 10 10 0 1
- t307 c 4 INT 9 10 10 0 1
- t307 d 4 INT 9 10 10 0 1
- t307 e 4 INT 9 10 10 0 1
- t308 a 4 INT 9 10 10 0 1
- t308 b 4 INT 9 10 10 0 1
- t308 c 4 INT 9 10 10 0 1
- t308 d 4 INT 9 10 10 0 1
- t308 e 4 INT 9 10 10 0 1
- t309 a 4 INT 9 10 10 0 1
- t309 b 4 INT 9 10 10 0 1
- t309 c 4 INT 9 10 10 0 1
- t309 d 4 INT 9 10 10 0 1
- t309 e 4 INT 9 10 10 0 1
- t310 a 4 INT 9 10 10 0 1
- t310 b 4 INT 9 10 10 0 1
- t310 c 4 INT 9 10 10 0 1
- t310 d 4 INT 9 10 10 0 1
- t310 e 4 INT 9 10 10 0 1
- t311 a 4 INT 9 10 10 0 1
- t311 b 4 INT 9 10 10 0 1
- t311 c 4 INT 9 10 10 0 1
- t311 d 4 INT 9 10 10 0 1
- t311 e 4 INT 9 10 10 0 1
- t312 a 4 INT 9 10 10 0 1
- t312 b 4 INT 9 10 10 0 1
- t312 c 4 INT 9 10 10 0 1
- t312 d 4 INT 9 10 10 0 1
- t312 e 4 INT 9 10 10 0 1
- t313 a 4 INT 9 10 10 0 1
- t313 b 4 INT 9 10 10 0 1
- t313 c 4 INT 9 10 10 0 1
- t313 d 4 INT 9 10 10 0 1
- t313 e 4 INT 9 10 10 0 1
- t314 a 4 INT 9 10 10 0 1
- t314 b 4 INT 9 10 10 0 1
- t314 c 4 INT 9 10 10 0 1
- t314 d 4 INT 9 10 10 0 1
- t314 e 4 INT 9 10 10 0 1
- t315 a 4 INT 9 10 10 0 1
- t315 b 4 INT 9 10 10 0 1
- t315 c 4 INT 9 10 10 0 1
- t315 d 4 INT 9 10 10 0 1
- t315 e 4 INT 9 10 10 0 1
- t316 a 4 INT 9 10 10 0 1
- t316 b 4 INT 9 10 10 0 1
- t316 c 4 INT 9 10 10 0 1
- t316 d 4 INT 9 10 10 0 1
- t316 e 4 INT 9 10 10 0 1
- t317 a 4 INT 9 10 10 0 1
- t317 b 4 INT 9 10 10 0 1
- t317 c 4 INT 9 10 10 0 1
- t317 d 4 INT 9 10 10 0 1
- t317 e 4 INT 9 10 10 0 1
- t318 a 4 INT 9 10 10 0 1
- t318 b 4 INT 9 10 10 0 1
- t318 c 4 INT 9 10 10 0 1
- t318 d 4 INT 9 10 10 0 1
- t318 e 4 INT 9 10 10 0 1
- t319 a 4 INT 9 10 10 0 1
- t319 b 4 INT 9 10 10 0 1
- t319 c 4 INT 9 10 10 0 1
- t319 d 4 INT 9 10 10 0 1
- t319 e 4 INT 9 10 10 0 1
- t320 a 4 INT 9 10 10 0 1
- t320 b 4 INT 9 10 10 0 1
- t320 c 4 INT 9 10 10 0 1
- t320 d 4 INT 9 10 10 0 1
- t320 e 4 INT 9 10 10 0 1
- t321 a 4 INT 9 10 10 0 1
- t321 b 4 INT 9 10 10 0 1
- t321 c 4 INT 9 10 10 0 1
- t321 d 4 INT 9 10 10 0 1
- t321 e 4 INT 9 10 10 0 1
- t322 a 4 INT 9 10 10 0 1
- t322 b 4 INT 9 10 10 0 1
- t322 c 4 INT 9 10 10 0 1
- t322 d 4 INT 9 10 10 0 1
- t322 e 4 INT 9 10 10 0 1
- t323 a 4 INT 9 10 10 0 1
- t323 b 4 INT 9 10 10 0 1
- t323 c 4 INT 9 10 10 0 1
- t323 d 4 INT 9 10 10 0 1
- t323 e 4 INT 9 10 10 0 1
- t324 a 4 INT 9 10 10 0 1
- t324 b 4 INT 9 10 10 0 1
- t324 c 4 INT 9 10 10 0 1
- t324 d 4 INT 9 10 10 0 1
- t324 e 4 INT 9 10 10 0 1
- t325 a 4 INT 9 10 10 0 1
- t325 b 4 INT 9 10 10 0 1
- t325 c 4 INT 9 10 10 0 1
- t325 d 4 INT 9 10 10 0 1
- t325 e 4 INT 9 10 10 0 1
- t326 a 4 INT 9 10 10 0 1
- t326 b 4 INT 9 10 10 0 1
- t326 c 4 INT 9 10 10 0 1
- t326 d 4 INT 9 10 10 0 1
- t326 e 4 INT 9 10 10 0 1
- t327 a 4 INT 9 10 10 0 1
- t327 b 4 INT 9 10 10 0 1
- t327 c 4 INT 9 10 10 0 1
- t327 d 4 INT 9 10 10 0 1
- t327 e 4 INT 9 10 10 0 1
- t328 a 4 INT 9 10 10 0 1
- t328 b 4 INT 9 10 10 0 1
- t328 c 4 INT 9 10 10 0 1
- t328 d 4 INT 9 10 10 0 1
- t328 e 4 INT 9 10 10 0 1
- t329 a 4 INT 9 10 10 0 1
- t329 b 4 INT 9 10 10 0 1
- t329 c 4 INT 9 10 10 0 1
- t329 d 4 INT 9 10 10 0 1
- t329 e 4 INT 9 10 10 0 1
- t330 a 4 INT 9 10 10 0 1
- t330 b 4 INT 9 10 10 0 1
- t330 c 4 INT 9 10 10 0 1
- t330 d 4 INT 9 10 10 0 1
- t330 e 4 INT 9 10 10 0 1
- t331 a 4 INT 9 10 10 0 1
- t331 b 4 INT 9 10 10 0 1
- t331 c 4 INT 9 10 10 0 1
- t331 d 4 INT 9 10 10 0 1
- t331 e 4 INT 9 10 10 0 1
- t332 a 4 INT 9 10 10 0 1
- t332 b 4 INT 9 10 10 0 1
- t332 c 4 INT 9 10 10 0 1
- t332 d 4 INT 9 10 10 0 1
- t332 e 4 INT 9 10 10 0 1
- t333 a 4 INT 9 10 10 0 1
- t333 b 4 INT 9 10 10 0 1
- t333 c 4 INT 9 10 10 0 1
- t333 d 4 INT 9 10 10 0 1
- t333 e 4 INT 9 10 10 0 1
- t334 a 4 INT 9 10 10 0 1
- t334 b 4 INT 9 10 10 0 1
- t334 c 4 INT 9 10 10 0 1
- t334 d 4 INT 9 10 10 0 1
- t334 e 4 INT 9 10 10 0 1
- t335 a 4 INT 9 10 10 0 1
- t335 b 4 INT 9 10 10 0 1
- t335 c 4 INT 9 10 10 0 1
- t335 d 4 INT 9 10 10 0 1
- t335 e 4 INT 9 10 10 0 1
- t336 a 4 INT 9 10 10 0 1
- t336 b 4 INT 9 10 10 0 1
- t336 c 4 INT 9 10 10 0 1
- t336 d 4 INT 9 10 10 0 1
- t336 e 4 INT 9 10 10 0 1
- t337 a 4 INT 9 10 10 0 1
- t337 b 4 INT 9 10 10 0 1
- t337 c 4 INT 9 10 10 0 1
- t337 d 4 INT 9 10 10 0 1
- t337 e 4 INT 9 10 10 0 1
- t338 a 4 INT 9 10 10 0 1
- t338 b 4 INT 9 10 10 0 1
- t338 c 4 INT 9 10 10 0 1
- t338 d 4 INT 9 10 10 0 1
- t338 e 4 INT 9 10 10 0 1
- t339 a 4 INT 9 10 10 0 1
- t339 b 4 INT 9 10 10 0 1
- t339 c 4 INT 9 10 10 0 1
- t339 d 4 INT 9 10 10 0 1
- t339 e 4 INT 9 10 10 0 1
- t340 a 4 INT 9 10 10 0 1
- t340 b 4 INT 9 10 10 0 1
- t340 c 4 INT 9 10 10 0 1
- t340 d 4 INT 9 10 10 0 1
- t340 e 4 INT 9 10 10 0 1
- t341 a 4 INT 9 10 10 0 1
- t341 b 4 INT 9 10 10 0 1
- t341 c 4 INT 9 10 10 0 1
- t341 d 4 INT 9 10 10 0 1
- t341 e 4 INT 9 10 10 0 1
- t342 a 4 INT 9 10 10 0 1
- t342 b 4 INT 9 10 10 0 1
- t342 c 4 INT 9 10 10 0 1
- t342 d 4 INT 9 10 10 0 1
- t342 e 4 INT 9 10 10 0 1
- t343 a 4 INT 9 10 10 0 1
- t343 b 4 INT 9 10 10 0 1
- t343 c 4 INT 9 10 10 0 1
- t343 d 4 INT 9 10 10 0 1
- t343 e 4 INT 9 10 10 0 1
- t344 a 4 INT 9 10 10 0 1
- t344 b 4 INT 9 10 10 0 1
- t344 c 4 INT 9 10 10 0 1
- t344 d 4 INT 9 10 10 0 1
- t344 e 4 INT 9 10 10 0 1
- t345 a 4 INT 9 10 10 0 1
- t345 b 4 INT 9 10 10 0 1
- t345 c 4 INT 9 10 10 0 1
- t345 d 4 INT 9 10 10 0 1
- t345 e 4 INT 9 10 10 0 1
- t346 a 4 INT 9 10 10 0 1
- t346 b 4 INT 9 10 10 0 1
- t346 c 4 INT 9 10 10 0 1
- t346 d 4 INT 9 10 10 0 1
- t346 e 4 INT 9 10 10 0 1
- t347 a 4 INT 9 10 10 0 1
- t347 b 4 INT 9 10 10 0 1
- t347 c 4 INT 9 10 10 0 1
- t347 d 4 INT 9 10 10 0 1
- t347 e 4 INT 9 10 10 0 1
- t348 a 4 INT 9 10 10 0 1
- t348 b 4 INT 9 10 10 0 1
- t348 c 4 INT 9 10 10 0 1
- t348 d 4 INT 9 10 10 0 1
- t348 e 4 INT 9 10 10 0 1
- t349 a 4 INT 9 10 10 0 1
- t349 b 4 INT 9 10 10 0 1
- t349 c 4 INT 9 10 10 0 1
- t349 d 4 INT 9 10 10 0 1
- t349 e 4 INT 9 10 10 0 1
- t350 a 4 INT 9 10 10 0 1
- t350 b 4 INT 9 10 10 0 1
- t350 c 4 INT 9 10 10 0 1
- t350 d 4 INT 9 10 10 0 1
- t350 e 4 INT 9 10 10 0 1
- t351 a 4 INT 9 10 10 0 1
- t351 b 4 INT 9 10 10 0 1
- t351 c 4 INT 9 10 10 0 1
- t351 d 4 INT 9 10 10 0 1
- t351 e 4 INT 9 10 10 0 1
- t352 a 4 INT 9 10 10 0 1
- t352 b 4 INT 9 10 10 0 1
- t352 c 4 INT 9 10 10 0 1
- t352 d 4 INT 9 10 10 0 1
- t352 e 4 INT 9 10 10 0 1
- t353 a 4 INT 9 10 10 0 1
- t353 b 4 INT 9 10 10 0 1
- t353 c 4 INT 9 10 10 0 1
- t353 d 4 INT 9 10 10 0 1
- t353 e 4 INT 9 10 10 0 1
- t354 a 4 INT 9 10 10 0 1
- t354 b 4 INT 9 10 10 0 1
- t354 c 4 INT 9 10 10 0 1
- t354 d 4 INT 9 10 10 0 1
- t354 e 4 INT 9 10 10 0 1
- t355 a 4 INT 9 10 10 0 1
- t355 b 4 INT 9 10 10 0 1
- t355 c 4 INT 9 10 10 0 1
- t355 d 4 INT 9 10 10 0 1
- t355 e 4 INT 9 10 10 0 1
- t356 a 4 INT 9 10 10 0 1
- t356 b 4 INT 9 10 10 0 1
- t356 c 4 INT 9 10 10 0 1
- t356 d 4 INT 9 10 10 0 1
- t356 e 4 INT 9 10 10 0 1
- t357 a 4 INT 9 10 10 0 1
- t357 b 4 INT 9 10 10 0 1
- t357 c 4 INT 9 10 10 0 1
- t357 d 4 INT 9 10 10 0 1
- t357 e 4 INT 9 10 10 0 1
- t358 a 4 INT 9 10 10 0 1
- t358 b 4 INT 9 10 10 0 1
- t358 c 4 INT 9 10 10 0 1
- t358 d 4 INT 9 10 10 0 1
- t358 e 4 INT 9 10 10 0 1
- t359 a 4 INT 9 10 10 0 1
- t359 b 4 INT 9 10 10 0 1
- t359 c 4 INT 9 10 10 0 1
- t359 d 4 INT 9 10 10 0 1
- t359 e 4 INT 9 10 10 0 1
- t360 a 4 INT 9 10 10 0 1
- t360 b 4 INT 9 10 10 0 1
- t360 c 4 INT 9 10 10 0 1
- t360 d 4 INT 9 10 10 0 1
- t360 e 4 INT 9 10 10 0 1
- t361 a 4 INT 9 10 10 0 1
- t361 b 4 INT 9 10 10 0 1
- t361 c 4 INT 9 10 10 0 1
- t361 d 4 INT 9 10 10 0 1
- t361 e 4 INT 9 10 10 0 1
- t362 a 4 INT 9 10 10 0 1
- t362 b 4 INT 9 10 10 0 1
- t362 c 4 INT 9 10 10 0 1
- t362 d 4 INT 9 10 10 0 1
- t362 e 4 INT 9 10 10 0 1
- t363 a 4 INT 9 10 10 0 1
- t363 b 4 INT 9 10 10 0 1
- t363 c 4 INT 9 10 10 0 1
- t363 d 4 INT 9 10 10 0 1
- t363 e 4 INT 9 10 10 0 1
- t364 a 4 INT 9 10 10 0 1
- t364 b 4 INT 9 10 10 0 1
- t364 c 4 INT 9 10 10 0 1
- t364 d 4 INT 9 10 10 0 1
- t364 e 4 INT 9 10 10 0 1
- t365 a 4 INT 9 10 10 0 1
- t365 b 4 INT 9 10 10 0 1
- t365 c 4 INT 9 10 10 0 1
- t365 d 4 INT 9 10 10 0 1
- t365 e 4 INT 9 10 10 0 1
- t366 a 4 INT 9 10 10 0 1
- t366 b 4 INT 9 10 10 0 1
- t366 c 4 INT 9 10 10 0 1
- t366 d 4 INT 9 10 10 0 1
- t366 e 4 INT 9 10 10 0 1
- t367 a 4 INT 9 10 10 0 1
- t367 b 4 INT 9 10 10 0 1
- t367 c 4 INT 9 10 10 0 1
- t367 d 4 INT 9 10 10 0 1
- t367 e 4 INT 9 10 10 0 1
- t368 a 4 INT 9 10 10 0 1
- t368 b 4 INT 9 10 10 0 1
- t368 c 4 INT 9 10 10 0 1
- t368 d 4 INT 9 10 10 0 1
- t368 e 4 INT 9 10 10 0 1
- t369 a 4 INT 9 10 10 0 1
- t369 b 4 INT 9 10 10 0 1
- t369 c 4 INT 9 10 10 0 1
- t369 d 4 INT 9 10 10 0 1
- t369 e 4 INT 9 10 10 0 1
- t370 a 4 INT 9 10 10 0 1
- t370 b 4 INT 9 10 10 0 1
- t370 c 4 INT 9 10 10 0 1
- t370 d 4 INT 9 10 10 0 1
- t370 e 4 INT 9 10 10 0 1
- t371 a 4 INT 9 10 10 0 1
- t371 b 4 INT 9 10 10 0 1
- t371 c 4 INT 9 10 10 0 1
- t371 d 4 INT 9 10 10 0 1
- t371 e 4 INT 9 10 10 0 1
- t372 a 4 INT 9 10 10 0 1
- t372 b 4 INT 9 10 10 0 1
- t372 c 4 INT 9 10 10 0 1
- t372 d 4 INT 9 10 10 0 1
- t372 e 4 INT 9 10 10 0 1
- t373 a 4 INT 9 10 10 0 1
- t373 b 4 INT 9 10 10 0 1
- t373 c 4 INT 9 10 10 0 1
- t373 d 4 INT 9 10 10 0 1
- t373 e 4 INT 9 10 10 0 1
- t374 a 4 INT 9 10 10 0 1
- t374 b 4 INT 9 10 10 0 1
- t374 c 4 INT 9 10 10 0 1
- t374 d 4 INT 9 10 10 0 1
- t374 e 4 INT 9 10 10 0 1
- t375 a 4 INT 9 10 10 0 1
- t375 b 4 INT 9 10 10 0 1
- t375 c 4 INT 9 10 10 0 1
- t375 d 4 INT 9 10 10 0 1
- t375 e 4 INT 9 10 10 0 1
- t376 a 4 INT 9 10 10 0 1
- t376 b 4 INT 9 10 10 0 1
- t376 c 4 INT 9 10 10 0 1
- t376 d 4 INT 9 10 10 0 1
- t376 e 4 INT 9 10 10 0 1
- t377 a 4 INT 9 10 10 0 1
- t377 b 4 INT 9 10 10 0 1
- t377 c 4 INT 9 10 10 0 1
- t377 d 4 INT 9 10 10 0 1
- t377 e 4 INT 9 10 10 0 1
- t378 a 4 INT 9 10 10 0 1
- t378 b 4 INT 9 10 10 0 1
- t378 c 4 INT 9 10 10 0 1
- t378 d 4 INT 9 10 10 0 1
- t378 e 4 INT 9 10 10 0 1
- t379 a 4 INT 9 10 10 0 1
- t379 b 4 INT 9 10 10 0 1
- t379 c 4 INT 9 10 10 0 1
- t379 d 4 INT 9 10 10 0 1
- t379 e 4 INT 9 10 10 0 1
- t380 a 4 INT 9 10 10 0 1
- t380 b 4 INT 9 10 10 0 1
- t380 c 4 INT 9 10 10 0 1
- t380 d 4 INT 9 10 10 0 1
- t380 e 4 INT 9 10 10 0 1
- t381 a 4 INT 9 10 10 0 1
- t381 b 4 INT 9 10 10 0 1
- t381 c 4 INT 9 10 10 0 1
- t381 d 4 INT 9 10 10 0 1
- t381 e 4 INT 9 10 10 0 1
- t382 a 4 INT 9 10 10 0 1
- t382 b 4 INT 9 10 10 0 1
- t382 c 4 INT 9 10 10 0 1
- t382 d 4 INT 9 10 10 0 1
- t382 e 4 INT 9 10 10 0 1
- t383 a 4 INT 9 10 10 0 1
- t383 b 4 INT 9 10 10 0 1
- t383 c 4 INT 9 10 10 0 1
- t383 d 4 INT 9 10 10 0 1
- t383 e 4 INT 9 10 10 0 1
- t384 a 4 INT 9 10 10 0 1
- t384 b 4 INT 9 10 10 0 1
- t384 c 4 INT 9 10 10 0 1
- t384 d 4 INT 9 10 10 0 1
- t384 e 4 INT 9 10 10 0 1
- t385 a 4 INT 9 10 10 0 1
- t385 b 4 INT 9 10 10 0 1
- t385 c 4 INT 9 10 10 0 1
- t385 d 4 INT 9 10 10 0 1
- t385 e 4 INT 9 10 10 0 1
- t386 a 4 INT 9 10 10 0 1
- t386 b 4 INT 9 10 10 0 1
- t386 c 4 INT 9 10 10 0 1
- t386 d 4 INT 9 10 10 0 1
- t386 e 4 INT 9 10 10 0 1
- t387 a 4 INT 9 10 10 0 1
- t387 b 4 INT 9 10 10 0 1
- t387 c 4 INT 9 10 10 0 1
- t387 d 4 INT 9 10 10 0 1
- t387 e 4 INT 9 10 10 0 1
- t388 a 4 INT 9 10 10 0 1
- t388 b 4 INT 9 10 10 0 1
- t388 c 4 INT 9 10 10 0 1
- t388 d 4 INT 9 10 10 0 1
- t388 e 4 INT 9 10 10 0 1
- t389 a 4 INT 9 10 10 0 1
- t389 b 4 INT 9 10 10 0 1
- t389 c 4 INT 9 10 10 0 1
- t389 d 4 INT 9 10 10 0 1
- t389 e 4 INT 9 10 10 0 1
- t390 a 4 INT 9 10 10 0 1
- t390 b 4 INT 9 10 10 0 1
- t390 c 4 INT 9 10 10 0 1
- t390 d 4 INT 9 10 10 0 1
- t390 e 4 INT 9 10 10 0 1
- t391 a 4 INT 9 10 10 0 1
- t391 b 4 INT 9 10 10 0 1
- t391 c 4 INT 9 10 10 0 1
- t391 d 4 INT 9 10 10 0 1
- t391 e 4 INT 9 10 10 0 1
- t392 a 4 INT 9 10 10 0 1
- t392 b 4 INT 9 10 10 0 1
- t392 c 4 INT 9 10 10 0 1
- t392 d 4 INT 9 10 10 0 1
- t392 e 4 INT 9 10 10 0 1
- t393 a 4 INT 9 10 10 0 1
- t393 b 4 INT 9 10 10 0 1
- t393 c 4 INT 9 10 10 0 1
- t393 d 4 INT 9 10 10 0 1
- t393 e 4 INT 9 10 10 0 1
- t394 a 4 INT 9 10 10 0 1
- t394 b 4 INT 9 10 10 0 1
- t394 c 4 INT 9 10 10 0 1
- t394 d 4 INT 9 10 10 0 1
- t394 e 4 INT 9 10 10 0 1
- t395 a 4 INT 9 10 10 0 1
- t395 b 4 INT 9 10 10 0 1
- t395 c 4 INT 9 10 10 0 1
- t395 d 4 INT 9 10 10 0 1
- t395 e 4 INT 9 10 10 0 1
- t396 a 4 INT 9 10 10 0 1
- t396 b 4 INT 9 10 10 0 1
- t396 c 4 INT 9 10 10 0 1
- t396 d 4 INT 9 10 10 0 1
- t396 e 4 INT 9 10 10 0 1
- t397 a 4 INT 9 10 10 0 1
- t397 b 4 INT 9 10 10 0 1
- t397 c 4 INT 9 10 10 0 1
- t397 d 4 INT 9 10 10 0 1
- t397 e 4 INT 9 10 10 0 1
- t398 a 4 INT 9 10 10 0 1
- t398 b 4 INT 9 10 10 0 1
- t398 c 4 INT 9 10 10 0 1
- t398 d 4 INT 9 10 10 0 1
- t398 e 4 INT 9 10 10 0 1
- t399 a 4 INT 9 10 10 0 1
- t399 b 4 INT 9 10 10 0 1
- t399 c 4 INT 9 10 10 0 1
- t399 d 4 INT 9 10 10 0 1
- t399 e 4 INT 9 10 10 0 1
+ t000 a 4 INT 9 10 10 0 1 NULL
+ t000 b 4 INT 9 10 10 0 1 NULL
+ t000 c 4 INT 9 10 10 0 1 NULL
+ t000 d 4 INT 9 10 10 0 1 NULL
+ t000 e 4 INT 9 10 10 0 1 NULL
+ t001 a 4 INT 9 10 10 0 1 NULL
+ t001 b 4 INT 9 10 10 0 1 NULL
+ t001 c 4 INT 9 10 10 0 1 NULL
+ t001 d 4 INT 9 10 10 0 1 NULL
+ t001 e 4 INT 9 10 10 0 1 NULL
+ t002 a 4 INT 9 10 10 0 1 NULL
+ t002 b 4 INT 9 10 10 0 1 NULL
+ t002 c 4 INT 9 10 10 0 1 NULL
+ t002 d 4 INT 9 10 10 0 1 NULL
+ t002 e 4 INT 9 10 10 0 1 NULL
+ t003 a 4 INT 9 10 10 0 1 NULL
+ t003 b 4 INT 9 10 10 0 1 NULL
+ t003 c 4 INT 9 10 10 0 1 NULL
+ t003 d 4 INT 9 10 10 0 1 NULL
+ t003 e 4 INT 9 10 10 0 1 NULL
+ t004 a 4 INT 9 10 10 0 1 NULL
+ t004 b 4 INT 9 10 10 0 1 NULL
+ t004 c 4 INT 9 10 10 0 1 NULL
+ t004 d 4 INT 9 10 10 0 1 NULL
+ t004 e 4 INT 9 10 10 0 1 NULL
+ t005 a 4 INT 9 10 10 0 1 NULL
+ t005 b 4 INT 9 10 10 0 1 NULL
+ t005 c 4 INT 9 10 10 0 1 NULL
+ t005 d 4 INT 9 10 10 0 1 NULL
+ t005 e 4 INT 9 10 10 0 1 NULL
+ t006 a 4 INT 9 10 10 0 1 NULL
+ t006 b 4 INT 9 10 10 0 1 NULL
+ t006 c 4 INT 9 10 10 0 1 NULL
+ t006 d 4 INT 9 10 10 0 1 NULL
+ t006 e 4 INT 9 10 10 0 1 NULL
+ t007 a 4 INT 9 10 10 0 1 NULL
+ t007 b 4 INT 9 10 10 0 1 NULL
+ t007 c 4 INT 9 10 10 0 1 NULL
+ t007 d 4 INT 9 10 10 0 1 NULL
+ t007 e 4 INT 9 10 10 0 1 NULL
+ t008 a 4 INT 9 10 10 0 1 NULL
+ t008 b 4 INT 9 10 10 0 1 NULL
+ t008 c 4 INT 9 10 10 0 1 NULL
+ t008 d 4 INT 9 10 10 0 1 NULL
+ t008 e 4 INT 9 10 10 0 1 NULL
+ t009 a 4 INT 9 10 10 0 1 NULL
+ t009 b 4 INT 9 10 10 0 1 NULL
+ t009 c 4 INT 9 10 10 0 1 NULL
+ t009 d 4 INT 9 10 10 0 1 NULL
+ t009 e 4 INT 9 10 10 0 1 NULL
+ t010 a 4 INT 9 10 10 0 1 NULL
+ t010 b 4 INT 9 10 10 0 1 NULL
+ t010 c 4 INT 9 10 10 0 1 NULL
+ t010 d 4 INT 9 10 10 0 1 NULL
+ t010 e 4 INT 9 10 10 0 1 NULL
+ t011 a 4 INT 9 10 10 0 1 NULL
+ t011 b 4 INT 9 10 10 0 1 NULL
+ t011 c 4 INT 9 10 10 0 1 NULL
+ t011 d 4 INT 9 10 10 0 1 NULL
+ t011 e 4 INT 9 10 10 0 1 NULL
+ t012 a 4 INT 9 10 10 0 1 NULL
+ t012 b 4 INT 9 10 10 0 1 NULL
+ t012 c 4 INT 9 10 10 0 1 NULL
+ t012 d 4 INT 9 10 10 0 1 NULL
+ t012 e 4 INT 9 10 10 0 1 NULL
+ t013 a 4 INT 9 10 10 0 1 NULL
+ t013 b 4 INT 9 10 10 0 1 NULL
+ t013 c 4 INT 9 10 10 0 1 NULL
+ t013 d 4 INT 9 10 10 0 1 NULL
+ t013 e 4 INT 9 10 10 0 1 NULL
+ t014 a 4 INT 9 10 10 0 1 NULL
+ t014 b 4 INT 9 10 10 0 1 NULL
+ t014 c 4 INT 9 10 10 0 1 NULL
+ t014 d 4 INT 9 10 10 0 1 NULL
+ t014 e 4 INT 9 10 10 0 1 NULL
+ t015 a 4 INT 9 10 10 0 1 NULL
+ t015 b 4 INT 9 10 10 0 1 NULL
+ t015 c 4 INT 9 10 10 0 1 NULL
+ t015 d 4 INT 9 10 10 0 1 NULL
+ t015 e 4 INT 9 10 10 0 1 NULL
+ t016 a 4 INT 9 10 10 0 1 NULL
+ t016 b 4 INT 9 10 10 0 1 NULL
+ t016 c 4 INT 9 10 10 0 1 NULL
+ t016 d 4 INT 9 10 10 0 1 NULL
+ t016 e 4 INT 9 10 10 0 1 NULL
+ t017 a 4 INT 9 10 10 0 1 NULL
+ t017 b 4 INT 9 10 10 0 1 NULL
+ t017 c 4 INT 9 10 10 0 1 NULL
+ t017 d 4 INT 9 10 10 0 1 NULL
+ t017 e 4 INT 9 10 10 0 1 NULL
+ t018 a 4 INT 9 10 10 0 1 NULL
+ t018 b 4 INT 9 10 10 0 1 NULL
+ t018 c 4 INT 9 10 10 0 1 NULL
+ t018 d 4 INT 9 10 10 0 1 NULL
+ t018 e 4 INT 9 10 10 0 1 NULL
+ t019 a 4 INT 9 10 10 0 1 NULL
+ t019 b 4 INT 9 10 10 0 1 NULL
+ t019 c 4 INT 9 10 10 0 1 NULL
+ t019 d 4 INT 9 10 10 0 1 NULL
+ t019 e 4 INT 9 10 10 0 1 NULL
+ t020 a 4 INT 9 10 10 0 1 NULL
+ t020 b 4 INT 9 10 10 0 1 NULL
+ t020 c 4 INT 9 10 10 0 1 NULL
+ t020 d 4 INT 9 10 10 0 1 NULL
+ t020 e 4 INT 9 10 10 0 1 NULL
+ t021 a 4 INT 9 10 10 0 1 NULL
+ t021 b 4 INT 9 10 10 0 1 NULL
+ t021 c 4 INT 9 10 10 0 1 NULL
+ t021 d 4 INT 9 10 10 0 1 NULL
+ t021 e 4 INT 9 10 10 0 1 NULL
+ t022 a 4 INT 9 10 10 0 1 NULL
+ t022 b 4 INT 9 10 10 0 1 NULL
+ t022 c 4 INT 9 10 10 0 1 NULL
+ t022 d 4 INT 9 10 10 0 1 NULL
+ t022 e 4 INT 9 10 10 0 1 NULL
+ t023 a 4 INT 9 10 10 0 1 NULL
+ t023 b 4 INT 9 10 10 0 1 NULL
+ t023 c 4 INT 9 10 10 0 1 NULL
+ t023 d 4 INT 9 10 10 0 1 NULL
+ t023 e 4 INT 9 10 10 0 1 NULL
+ t024 a 4 INT 9 10 10 0 1 NULL
+ t024 b 4 INT 9 10 10 0 1 NULL
+ t024 c 4 INT 9 10 10 0 1 NULL
+ t024 d 4 INT 9 10 10 0 1 NULL
+ t024 e 4 INT 9 10 10 0 1 NULL
+ t025 a 4 INT 9 10 10 0 1 NULL
+ t025 b 4 INT 9 10 10 0 1 NULL
+ t025 c 4 INT 9 10 10 0 1 NULL
+ t025 d 4 INT 9 10 10 0 1 NULL
+ t025 e 4 INT 9 10 10 0 1 NULL
+ t026 a 4 INT 9 10 10 0 1 NULL
+ t026 b 4 INT 9 10 10 0 1 NULL
+ t026 c 4 INT 9 10 10 0 1 NULL
+ t026 d 4 INT 9 10 10 0 1 NULL
+ t026 e 4 INT 9 10 10 0 1 NULL
+ t027 a 4 INT 9 10 10 0 1 NULL
+ t027 b 4 INT 9 10 10 0 1 NULL
+ t027 c 4 INT 9 10 10 0 1 NULL
+ t027 d 4 INT 9 10 10 0 1 NULL
+ t027 e 4 INT 9 10 10 0 1 NULL
+ t028 a 4 INT 9 10 10 0 1 NULL
+ t028 b 4 INT 9 10 10 0 1 NULL
+ t028 c 4 INT 9 10 10 0 1 NULL
+ t028 d 4 INT 9 10 10 0 1 NULL
+ t028 e 4 INT 9 10 10 0 1 NULL
+ t029 a 4 INT 9 10 10 0 1 NULL
+ t029 b 4 INT 9 10 10 0 1 NULL
+ t029 c 4 INT 9 10 10 0 1 NULL
+ t029 d 4 INT 9 10 10 0 1 NULL
+ t029 e 4 INT 9 10 10 0 1 NULL
+ t030 a 4 INT 9 10 10 0 1 NULL
+ t030 b 4 INT 9 10 10 0 1 NULL
+ t030 c 4 INT 9 10 10 0 1 NULL
+ t030 d 4 INT 9 10 10 0 1 NULL
+ t030 e 4 INT 9 10 10 0 1 NULL
+ t031 a 4 INT 9 10 10 0 1 NULL
+ t031 b 4 INT 9 10 10 0 1 NULL
+ t031 c 4 INT 9 10 10 0 1 NULL
+ t031 d 4 INT 9 10 10 0 1 NULL
+ t031 e 4 INT 9 10 10 0 1 NULL
+ t032 a 4 INT 9 10 10 0 1 NULL
+ t032 b 4 INT 9 10 10 0 1 NULL
+ t032 c 4 INT 9 10 10 0 1 NULL
+ t032 d 4 INT 9 10 10 0 1 NULL
+ t032 e 4 INT 9 10 10 0 1 NULL
+ t033 a 4 INT 9 10 10 0 1 NULL
+ t033 b 4 INT 9 10 10 0 1 NULL
+ t033 c 4 INT 9 10 10 0 1 NULL
+ t033 d 4 INT 9 10 10 0 1 NULL
+ t033 e 4 INT 9 10 10 0 1 NULL
+ t034 a 4 INT 9 10 10 0 1 NULL
+ t034 b 4 INT 9 10 10 0 1 NULL
+ t034 c 4 INT 9 10 10 0 1 NULL
+ t034 d 4 INT 9 10 10 0 1 NULL
+ t034 e 4 INT 9 10 10 0 1 NULL
+ t035 a 4 INT 9 10 10 0 1 NULL
+ t035 b 4 INT 9 10 10 0 1 NULL
+ t035 c 4 INT 9 10 10 0 1 NULL
+ t035 d 4 INT 9 10 10 0 1 NULL
+ t035 e 4 INT 9 10 10 0 1 NULL
+ t036 a 4 INT 9 10 10 0 1 NULL
+ t036 b 4 INT 9 10 10 0 1 NULL
+ t036 c 4 INT 9 10 10 0 1 NULL
+ t036 d 4 INT 9 10 10 0 1 NULL
+ t036 e 4 INT 9 10 10 0 1 NULL
+ t037 a 4 INT 9 10 10 0 1 NULL
+ t037 b 4 INT 9 10 10 0 1 NULL
+ t037 c 4 INT 9 10 10 0 1 NULL
+ t037 d 4 INT 9 10 10 0 1 NULL
+ t037 e 4 INT 9 10 10 0 1 NULL
+ t038 a 4 INT 9 10 10 0 1 NULL
+ t038 b 4 INT 9 10 10 0 1 NULL
+ t038 c 4 INT 9 10 10 0 1 NULL
+ t038 d 4 INT 9 10 10 0 1 NULL
+ t038 e 4 INT 9 10 10 0 1 NULL
+ t039 a 4 INT 9 10 10 0 1 NULL
+ t039 b 4 INT 9 10 10 0 1 NULL
+ t039 c 4 INT 9 10 10 0 1 NULL
+ t039 d 4 INT 9 10 10 0 1 NULL
+ t039 e 4 INT 9 10 10 0 1 NULL
+ t040 a 4 INT 9 10 10 0 1 NULL
+ t040 b 4 INT 9 10 10 0 1 NULL
+ t040 c 4 INT 9 10 10 0 1 NULL
+ t040 d 4 INT 9 10 10 0 1 NULL
+ t040 e 4 INT 9 10 10 0 1 NULL
+ t041 a 4 INT 9 10 10 0 1 NULL
+ t041 b 4 INT 9 10 10 0 1 NULL
+ t041 c 4 INT 9 10 10 0 1 NULL
+ t041 d 4 INT 9 10 10 0 1 NULL
+ t041 e 4 INT 9 10 10 0 1 NULL
+ t042 a 4 INT 9 10 10 0 1 NULL
+ t042 b 4 INT 9 10 10 0 1 NULL
+ t042 c 4 INT 9 10 10 0 1 NULL
+ t042 d 4 INT 9 10 10 0 1 NULL
+ t042 e 4 INT 9 10 10 0 1 NULL
+ t043 a 4 INT 9 10 10 0 1 NULL
+ t043 b 4 INT 9 10 10 0 1 NULL
+ t043 c 4 INT 9 10 10 0 1 NULL
+ t043 d 4 INT 9 10 10 0 1 NULL
+ t043 e 4 INT 9 10 10 0 1 NULL
+ t044 a 4 INT 9 10 10 0 1 NULL
+ t044 b 4 INT 9 10 10 0 1 NULL
+ t044 c 4 INT 9 10 10 0 1 NULL
+ t044 d 4 INT 9 10 10 0 1 NULL
+ t044 e 4 INT 9 10 10 0 1 NULL
+ t045 a 4 INT 9 10 10 0 1 NULL
+ t045 b 4 INT 9 10 10 0 1 NULL
+ t045 c 4 INT 9 10 10 0 1 NULL
+ t045 d 4 INT 9 10 10 0 1 NULL
+ t045 e 4 INT 9 10 10 0 1 NULL
+ t046 a 4 INT 9 10 10 0 1 NULL
+ t046 b 4 INT 9 10 10 0 1 NULL
+ t046 c 4 INT 9 10 10 0 1 NULL
+ t046 d 4 INT 9 10 10 0 1 NULL
+ t046 e 4 INT 9 10 10 0 1 NULL
+ t047 a 4 INT 9 10 10 0 1 NULL
+ t047 b 4 INT 9 10 10 0 1 NULL
+ t047 c 4 INT 9 10 10 0 1 NULL
+ t047 d 4 INT 9 10 10 0 1 NULL
+ t047 e 4 INT 9 10 10 0 1 NULL
+ t048 a 4 INT 9 10 10 0 1 NULL
+ t048 b 4 INT 9 10 10 0 1 NULL
+ t048 c 4 INT 9 10 10 0 1 NULL
+ t048 d 4 INT 9 10 10 0 1 NULL
+ t048 e 4 INT 9 10 10 0 1 NULL
+ t049 a 4 INT 9 10 10 0 1 NULL
+ t049 b 4 INT 9 10 10 0 1 NULL
+ t049 c 4 INT 9 10 10 0 1 NULL
+ t049 d 4 INT 9 10 10 0 1 NULL
+ t049 e 4 INT 9 10 10 0 1 NULL
+ t050 a 4 INT 9 10 10 0 1 NULL
+ t050 b 4 INT 9 10 10 0 1 NULL
+ t050 c 4 INT 9 10 10 0 1 NULL
+ t050 d 4 INT 9 10 10 0 1 NULL
+ t050 e 4 INT 9 10 10 0 1 NULL
+ t051 a 4 INT 9 10 10 0 1 NULL
+ t051 b 4 INT 9 10 10 0 1 NULL
+ t051 c 4 INT 9 10 10 0 1 NULL
+ t051 d 4 INT 9 10 10 0 1 NULL
+ t051 e 4 INT 9 10 10 0 1 NULL
+ t052 a 4 INT 9 10 10 0 1 NULL
+ t052 b 4 INT 9 10 10 0 1 NULL
+ t052 c 4 INT 9 10 10 0 1 NULL
+ t052 d 4 INT 9 10 10 0 1 NULL
+ t052 e 4 INT 9 10 10 0 1 NULL
+ t053 a 4 INT 9 10 10 0 1 NULL
+ t053 b 4 INT 9 10 10 0 1 NULL
+ t053 c 4 INT 9 10 10 0 1 NULL
+ t053 d 4 INT 9 10 10 0 1 NULL
+ t053 e 4 INT 9 10 10 0 1 NULL
+ t054 a 4 INT 9 10 10 0 1 NULL
+ t054 b 4 INT 9 10 10 0 1 NULL
+ t054 c 4 INT 9 10 10 0 1 NULL
+ t054 d 4 INT 9 10 10 0 1 NULL
+ t054 e 4 INT 9 10 10 0 1 NULL
+ t055 a 4 INT 9 10 10 0 1 NULL
+ t055 b 4 INT 9 10 10 0 1 NULL
+ t055 c 4 INT 9 10 10 0 1 NULL
+ t055 d 4 INT 9 10 10 0 1 NULL
+ t055 e 4 INT 9 10 10 0 1 NULL
+ t056 a 4 INT 9 10 10 0 1 NULL
+ t056 b 4 INT 9 10 10 0 1 NULL
+ t056 c 4 INT 9 10 10 0 1 NULL
+ t056 d 4 INT 9 10 10 0 1 NULL
+ t056 e 4 INT 9 10 10 0 1 NULL
+ t057 a 4 INT 9 10 10 0 1 NULL
+ t057 b 4 INT 9 10 10 0 1 NULL
+ t057 c 4 INT 9 10 10 0 1 NULL
+ t057 d 4 INT 9 10 10 0 1 NULL
+ t057 e 4 INT 9 10 10 0 1 NULL
+ t058 a 4 INT 9 10 10 0 1 NULL
+ t058 b 4 INT 9 10 10 0 1 NULL
+ t058 c 4 INT 9 10 10 0 1 NULL
+ t058 d 4 INT 9 10 10 0 1 NULL
+ t058 e 4 INT 9 10 10 0 1 NULL
+ t059 a 4 INT 9 10 10 0 1 NULL
+ t059 b 4 INT 9 10 10 0 1 NULL
+ t059 c 4 INT 9 10 10 0 1 NULL
+ t059 d 4 INT 9 10 10 0 1 NULL
+ t059 e 4 INT 9 10 10 0 1 NULL
+ t060 a 4 INT 9 10 10 0 1 NULL
+ t060 b 4 INT 9 10 10 0 1 NULL
+ t060 c 4 INT 9 10 10 0 1 NULL
+ t060 d 4 INT 9 10 10 0 1 NULL
+ t060 e 4 INT 9 10 10 0 1 NULL
+ t061 a 4 INT 9 10 10 0 1 NULL
+ t061 b 4 INT 9 10 10 0 1 NULL
+ t061 c 4 INT 9 10 10 0 1 NULL
+ t061 d 4 INT 9 10 10 0 1 NULL
+ t061 e 4 INT 9 10 10 0 1 NULL
+ t062 a 4 INT 9 10 10 0 1 NULL
+ t062 b 4 INT 9 10 10 0 1 NULL
+ t062 c 4 INT 9 10 10 0 1 NULL
+ t062 d 4 INT 9 10 10 0 1 NULL
+ t062 e 4 INT 9 10 10 0 1 NULL
+ t063 a 4 INT 9 10 10 0 1 NULL
+ t063 b 4 INT 9 10 10 0 1 NULL
+ t063 c 4 INT 9 10 10 0 1 NULL
+ t063 d 4 INT 9 10 10 0 1 NULL
+ t063 e 4 INT 9 10 10 0 1 NULL
+ t064 a 4 INT 9 10 10 0 1 NULL
+ t064 b 4 INT 9 10 10 0 1 NULL
+ t064 c 4 INT 9 10 10 0 1 NULL
+ t064 d 4 INT 9 10 10 0 1 NULL
+ t064 e 4 INT 9 10 10 0 1 NULL
+ t065 a 4 INT 9 10 10 0 1 NULL
+ t065 b 4 INT 9 10 10 0 1 NULL
+ t065 c 4 INT 9 10 10 0 1 NULL
+ t065 d 4 INT 9 10 10 0 1 NULL
+ t065 e 4 INT 9 10 10 0 1 NULL
+ t066 a 4 INT 9 10 10 0 1 NULL
+ t066 b 4 INT 9 10 10 0 1 NULL
+ t066 c 4 INT 9 10 10 0 1 NULL
+ t066 d 4 INT 9 10 10 0 1 NULL
+ t066 e 4 INT 9 10 10 0 1 NULL
+ t067 a 4 INT 9 10 10 0 1 NULL
+ t067 b 4 INT 9 10 10 0 1 NULL
+ t067 c 4 INT 9 10 10 0 1 NULL
+ t067 d 4 INT 9 10 10 0 1 NULL
+ t067 e 4 INT 9 10 10 0 1 NULL
+ t068 a 4 INT 9 10 10 0 1 NULL
+ t068 b 4 INT 9 10 10 0 1 NULL
+ t068 c 4 INT 9 10 10 0 1 NULL
+ t068 d 4 INT 9 10 10 0 1 NULL
+ t068 e 4 INT 9 10 10 0 1 NULL
+ t069 a 4 INT 9 10 10 0 1 NULL
+ t069 b 4 INT 9 10 10 0 1 NULL
+ t069 c 4 INT 9 10 10 0 1 NULL
+ t069 d 4 INT 9 10 10 0 1 NULL
+ t069 e 4 INT 9 10 10 0 1 NULL
+ t070 a 4 INT 9 10 10 0 1 NULL
+ t070 b 4 INT 9 10 10 0 1 NULL
+ t070 c 4 INT 9 10 10 0 1 NULL
+ t070 d 4 INT 9 10 10 0 1 NULL
+ t070 e 4 INT 9 10 10 0 1 NULL
+ t071 a 4 INT 9 10 10 0 1 NULL
+ t071 b 4 INT 9 10 10 0 1 NULL
+ t071 c 4 INT 9 10 10 0 1 NULL
+ t071 d 4 INT 9 10 10 0 1 NULL
+ t071 e 4 INT 9 10 10 0 1 NULL
+ t072 a 4 INT 9 10 10 0 1 NULL
+ t072 b 4 INT 9 10 10 0 1 NULL
+ t072 c 4 INT 9 10 10 0 1 NULL
+ t072 d 4 INT 9 10 10 0 1 NULL
+ t072 e 4 INT 9 10 10 0 1 NULL
+ t073 a 4 INT 9 10 10 0 1 NULL
+ t073 b 4 INT 9 10 10 0 1 NULL
+ t073 c 4 INT 9 10 10 0 1 NULL
+ t073 d 4 INT 9 10 10 0 1 NULL
+ t073 e 4 INT 9 10 10 0 1 NULL
+ t074 a 4 INT 9 10 10 0 1 NULL
+ t074 b 4 INT 9 10 10 0 1 NULL
+ t074 c 4 INT 9 10 10 0 1 NULL
+ t074 d 4 INT 9 10 10 0 1 NULL
+ t074 e 4 INT 9 10 10 0 1 NULL
+ t075 a 4 INT 9 10 10 0 1 NULL
+ t075 b 4 INT 9 10 10 0 1 NULL
+ t075 c 4 INT 9 10 10 0 1 NULL
+ t075 d 4 INT 9 10 10 0 1 NULL
+ t075 e 4 INT 9 10 10 0 1 NULL
+ t076 a 4 INT 9 10 10 0 1 NULL
+ t076 b 4 INT 9 10 10 0 1 NULL
+ t076 c 4 INT 9 10 10 0 1 NULL
+ t076 d 4 INT 9 10 10 0 1 NULL
+ t076 e 4 INT 9 10 10 0 1 NULL
+ t077 a 4 INT 9 10 10 0 1 NULL
+ t077 b 4 INT 9 10 10 0 1 NULL
+ t077 c 4 INT 9 10 10 0 1 NULL
+ t077 d 4 INT 9 10 10 0 1 NULL
+ t077 e 4 INT 9 10 10 0 1 NULL
+ t078 a 4 INT 9 10 10 0 1 NULL
+ t078 b 4 INT 9 10 10 0 1 NULL
+ t078 c 4 INT 9 10 10 0 1 NULL
+ t078 d 4 INT 9 10 10 0 1 NULL
+ t078 e 4 INT 9 10 10 0 1 NULL
+ t079 a 4 INT 9 10 10 0 1 NULL
+ t079 b 4 INT 9 10 10 0 1 NULL
+ t079 c 4 INT 9 10 10 0 1 NULL
+ t079 d 4 INT 9 10 10 0 1 NULL
+ t079 e 4 INT 9 10 10 0 1 NULL
+ t080 a 4 INT 9 10 10 0 1 NULL
+ t080 b 4 INT 9 10 10 0 1 NULL
+ t080 c 4 INT 9 10 10 0 1 NULL
+ t080 d 4 INT 9 10 10 0 1 NULL
+ t080 e 4 INT 9 10 10 0 1 NULL
+ t081 a 4 INT 9 10 10 0 1 NULL
+ t081 b 4 INT 9 10 10 0 1 NULL
+ t081 c 4 INT 9 10 10 0 1 NULL
+ t081 d 4 INT 9 10 10 0 1 NULL
+ t081 e 4 INT 9 10 10 0 1 NULL
+ t082 a 4 INT 9 10 10 0 1 NULL
+ t082 b 4 INT 9 10 10 0 1 NULL
+ t082 c 4 INT 9 10 10 0 1 NULL
+ t082 d 4 INT 9 10 10 0 1 NULL
+ t082 e 4 INT 9 10 10 0 1 NULL
+ t083 a 4 INT 9 10 10 0 1 NULL
+ t083 b 4 INT 9 10 10 0 1 NULL
+ t083 c 4 INT 9 10 10 0 1 NULL
+ t083 d 4 INT 9 10 10 0 1 NULL
+ t083 e 4 INT 9 10 10 0 1 NULL
+ t084 a 4 INT 9 10 10 0 1 NULL
+ t084 b 4 INT 9 10 10 0 1 NULL
+ t084 c 4 INT 9 10 10 0 1 NULL
+ t084 d 4 INT 9 10 10 0 1 NULL
+ t084 e 4 INT 9 10 10 0 1 NULL
+ t085 a 4 INT 9 10 10 0 1 NULL
+ t085 b 4 INT 9 10 10 0 1 NULL
+ t085 c 4 INT 9 10 10 0 1 NULL
+ t085 d 4 INT 9 10 10 0 1 NULL
+ t085 e 4 INT 9 10 10 0 1 NULL
+ t086 a 4 INT 9 10 10 0 1 NULL
+ t086 b 4 INT 9 10 10 0 1 NULL
+ t086 c 4 INT 9 10 10 0 1 NULL
+ t086 d 4 INT 9 10 10 0 1 NULL
+ t086 e 4 INT 9 10 10 0 1 NULL
+ t087 a 4 INT 9 10 10 0 1 NULL
+ t087 b 4 INT 9 10 10 0 1 NULL
+ t087 c 4 INT 9 10 10 0 1 NULL
+ t087 d 4 INT 9 10 10 0 1 NULL
+ t087 e 4 INT 9 10 10 0 1 NULL
+ t088 a 4 INT 9 10 10 0 1 NULL
+ t088 b 4 INT 9 10 10 0 1 NULL
+ t088 c 4 INT 9 10 10 0 1 NULL
+ t088 d 4 INT 9 10 10 0 1 NULL
+ t088 e 4 INT 9 10 10 0 1 NULL
+ t089 a 4 INT 9 10 10 0 1 NULL
+ t089 b 4 INT 9 10 10 0 1 NULL
+ t089 c 4 INT 9 10 10 0 1 NULL
+ t089 d 4 INT 9 10 10 0 1 NULL
+ t089 e 4 INT 9 10 10 0 1 NULL
+ t090 a 4 INT 9 10 10 0 1 NULL
+ t090 b 4 INT 9 10 10 0 1 NULL
+ t090 c 4 INT 9 10 10 0 1 NULL
+ t090 d 4 INT 9 10 10 0 1 NULL
+ t090 e 4 INT 9 10 10 0 1 NULL
+ t091 a 4 INT 9 10 10 0 1 NULL
+ t091 b 4 INT 9 10 10 0 1 NULL
+ t091 c 4 INT 9 10 10 0 1 NULL
+ t091 d 4 INT 9 10 10 0 1 NULL
+ t091 e 4 INT 9 10 10 0 1 NULL
+ t092 a 4 INT 9 10 10 0 1 NULL
+ t092 b 4 INT 9 10 10 0 1 NULL
+ t092 c 4 INT 9 10 10 0 1 NULL
+ t092 d 4 INT 9 10 10 0 1 NULL
+ t092 e 4 INT 9 10 10 0 1 NULL
+ t093 a 4 INT 9 10 10 0 1 NULL
+ t093 b 4 INT 9 10 10 0 1 NULL
+ t093 c 4 INT 9 10 10 0 1 NULL
+ t093 d 4 INT 9 10 10 0 1 NULL
+ t093 e 4 INT 9 10 10 0 1 NULL
+ t094 a 4 INT 9 10 10 0 1 NULL
+ t094 b 4 INT 9 10 10 0 1 NULL
+ t094 c 4 INT 9 10 10 0 1 NULL
+ t094 d 4 INT 9 10 10 0 1 NULL
+ t094 e 4 INT 9 10 10 0 1 NULL
+ t095 a 4 INT 9 10 10 0 1 NULL
+ t095 b 4 INT 9 10 10 0 1 NULL
+ t095 c 4 INT 9 10 10 0 1 NULL
+ t095 d 4 INT 9 10 10 0 1 NULL
+ t095 e 4 INT 9 10 10 0 1 NULL
+ t096 a 4 INT 9 10 10 0 1 NULL
+ t096 b 4 INT 9 10 10 0 1 NULL
+ t096 c 4 INT 9 10 10 0 1 NULL
+ t096 d 4 INT 9 10 10 0 1 NULL
+ t096 e 4 INT 9 10 10 0 1 NULL
+ t097 a 4 INT 9 10 10 0 1 NULL
+ t097 b 4 INT 9 10 10 0 1 NULL
+ t097 c 4 INT 9 10 10 0 1 NULL
+ t097 d 4 INT 9 10 10 0 1 NULL
+ t097 e 4 INT 9 10 10 0 1 NULL
+ t098 a 4 INT 9 10 10 0 1 NULL
+ t098 b 4 INT 9 10 10 0 1 NULL
+ t098 c 4 INT 9 10 10 0 1 NULL
+ t098 d 4 INT 9 10 10 0 1 NULL
+ t098 e 4 INT 9 10 10 0 1 NULL
+ t099 a 4 INT 9 10 10 0 1 NULL
+ t099 b 4 INT 9 10 10 0 1 NULL
+ t099 c 4 INT 9 10 10 0 1 NULL
+ t099 d 4 INT 9 10 10 0 1 NULL
+ t099 e 4 INT 9 10 10 0 1 NULL
+ t1 a 12 varchar(64) 64 64 10 0 1 NULL
+ t100 a 4 INT 9 10 10 0 1 NULL
+ t100 b 4 INT 9 10 10 0 1 NULL
+ t100 c 4 INT 9 10 10 0 1 NULL
+ t100 d 4 INT 9 10 10 0 1 NULL
+ t100 e 4 INT 9 10 10 0 1 NULL
+ t101 a 4 INT 9 10 10 0 1 NULL
+ t101 b 4 INT 9 10 10 0 1 NULL
+ t101 c 4 INT 9 10 10 0 1 NULL
+ t101 d 4 INT 9 10 10 0 1 NULL
+ t101 e 4 INT 9 10 10 0 1 NULL
+ t102 a 4 INT 9 10 10 0 1 NULL
+ t102 b 4 INT 9 10 10 0 1 NULL
+ t102 c 4 INT 9 10 10 0 1 NULL
+ t102 d 4 INT 9 10 10 0 1 NULL
+ t102 e 4 INT 9 10 10 0 1 NULL
+ t103 a 4 INT 9 10 10 0 1 NULL
+ t103 b 4 INT 9 10 10 0 1 NULL
+ t103 c 4 INT 9 10 10 0 1 NULL
+ t103 d 4 INT 9 10 10 0 1 NULL
+ t103 e 4 INT 9 10 10 0 1 NULL
+ t104 a 4 INT 9 10 10 0 1 NULL
+ t104 b 4 INT 9 10 10 0 1 NULL
+ t104 c 4 INT 9 10 10 0 1 NULL
+ t104 d 4 INT 9 10 10 0 1 NULL
+ t104 e 4 INT 9 10 10 0 1 NULL
+ t105 a 4 INT 9 10 10 0 1 NULL
+ t105 b 4 INT 9 10 10 0 1 NULL
+ t105 c 4 INT 9 10 10 0 1 NULL
+ t105 d 4 INT 9 10 10 0 1 NULL
+ t105 e 4 INT 9 10 10 0 1 NULL
+ t106 a 4 INT 9 10 10 0 1 NULL
+ t106 b 4 INT 9 10 10 0 1 NULL
+ t106 c 4 INT 9 10 10 0 1 NULL
+ t106 d 4 INT 9 10 10 0 1 NULL
+ t106 e 4 INT 9 10 10 0 1 NULL
+ t107 a 4 INT 9 10 10 0 1 NULL
+ t107 b 4 INT 9 10 10 0 1 NULL
+ t107 c 4 INT 9 10 10 0 1 NULL
+ t107 d 4 INT 9 10 10 0 1 NULL
+ t107 e 4 INT 9 10 10 0 1 NULL
+ t108 a 4 INT 9 10 10 0 1 NULL
+ t108 b 4 INT 9 10 10 0 1 NULL
+ t108 c 4 INT 9 10 10 0 1 NULL
+ t108 d 4 INT 9 10 10 0 1 NULL
+ t108 e 4 INT 9 10 10 0 1 NULL
+ t109 a 4 INT 9 10 10 0 1 NULL
+ t109 b 4 INT 9 10 10 0 1 NULL
+ t109 c 4 INT 9 10 10 0 1 NULL
+ t109 d 4 INT 9 10 10 0 1 NULL
+ t109 e 4 INT 9 10 10 0 1 NULL
+ t110 a 4 INT 9 10 10 0 1 NULL
+ t110 b 4 INT 9 10 10 0 1 NULL
+ t110 c 4 INT 9 10 10 0 1 NULL
+ t110 d 4 INT 9 10 10 0 1 NULL
+ t110 e 4 INT 9 10 10 0 1 NULL
+ t111 a 4 INT 9 10 10 0 1 NULL
+ t111 b 4 INT 9 10 10 0 1 NULL
+ t111 c 4 INT 9 10 10 0 1 NULL
+ t111 d 4 INT 9 10 10 0 1 NULL
+ t111 e 4 INT 9 10 10 0 1 NULL
+ t112 a 4 INT 9 10 10 0 1 NULL
+ t112 b 4 INT 9 10 10 0 1 NULL
+ t112 c 4 INT 9 10 10 0 1 NULL
+ t112 d 4 INT 9 10 10 0 1 NULL
+ t112 e 4 INT 9 10 10 0 1 NULL
+ t113 a 4 INT 9 10 10 0 1 NULL
+ t113 b 4 INT 9 10 10 0 1 NULL
+ t113 c 4 INT 9 10 10 0 1 NULL
+ t113 d 4 INT 9 10 10 0 1 NULL
+ t113 e 4 INT 9 10 10 0 1 NULL
+ t114 a 4 INT 9 10 10 0 1 NULL
+ t114 b 4 INT 9 10 10 0 1 NULL
+ t114 c 4 INT 9 10 10 0 1 NULL
+ t114 d 4 INT 9 10 10 0 1 NULL
+ t114 e 4 INT 9 10 10 0 1 NULL
+ t115 a 4 INT 9 10 10 0 1 NULL
+ t115 b 4 INT 9 10 10 0 1 NULL
+ t115 c 4 INT 9 10 10 0 1 NULL
+ t115 d 4 INT 9 10 10 0 1 NULL
+ t115 e 4 INT 9 10 10 0 1 NULL
+ t116 a 4 INT 9 10 10 0 1 NULL
+ t116 b 4 INT 9 10 10 0 1 NULL
+ t116 c 4 INT 9 10 10 0 1 NULL
+ t116 d 4 INT 9 10 10 0 1 NULL
+ t116 e 4 INT 9 10 10 0 1 NULL
+ t117 a 4 INT 9 10 10 0 1 NULL
+ t117 b 4 INT 9 10 10 0 1 NULL
+ t117 c 4 INT 9 10 10 0 1 NULL
+ t117 d 4 INT 9 10 10 0 1 NULL
+ t117 e 4 INT 9 10 10 0 1 NULL
+ t118 a 4 INT 9 10 10 0 1 NULL
+ t118 b 4 INT 9 10 10 0 1 NULL
+ t118 c 4 INT 9 10 10 0 1 NULL
+ t118 d 4 INT 9 10 10 0 1 NULL
+ t118 e 4 INT 9 10 10 0 1 NULL
+ t119 a 4 INT 9 10 10 0 1 NULL
+ t119 b 4 INT 9 10 10 0 1 NULL
+ t119 c 4 INT 9 10 10 0 1 NULL
+ t119 d 4 INT 9 10 10 0 1 NULL
+ t119 e 4 INT 9 10 10 0 1 NULL
+ t120 a 4 INT 9 10 10 0 1 NULL
+ t120 b 4 INT 9 10 10 0 1 NULL
+ t120 c 4 INT 9 10 10 0 1 NULL
+ t120 d 4 INT 9 10 10 0 1 NULL
+ t120 e 4 INT 9 10 10 0 1 NULL
+ t121 a 4 INT 9 10 10 0 1 NULL
+ t121 b 4 INT 9 10 10 0 1 NULL
+ t121 c 4 INT 9 10 10 0 1 NULL
+ t121 d 4 INT 9 10 10 0 1 NULL
+ t121 e 4 INT 9 10 10 0 1 NULL
+ t122 a 4 INT 9 10 10 0 1 NULL
+ t122 b 4 INT 9 10 10 0 1 NULL
+ t122 c 4 INT 9 10 10 0 1 NULL
+ t122 d 4 INT 9 10 10 0 1 NULL
+ t122 e 4 INT 9 10 10 0 1 NULL
+ t123 a 4 INT 9 10 10 0 1 NULL
+ t123 b 4 INT 9 10 10 0 1 NULL
+ t123 c 4 INT 9 10 10 0 1 NULL
+ t123 d 4 INT 9 10 10 0 1 NULL
+ t123 e 4 INT 9 10 10 0 1 NULL
+ t124 a 4 INT 9 10 10 0 1 NULL
+ t124 b 4 INT 9 10 10 0 1 NULL
+ t124 c 4 INT 9 10 10 0 1 NULL
+ t124 d 4 INT 9 10 10 0 1 NULL
+ t124 e 4 INT 9 10 10 0 1 NULL
+ t125 a 4 INT 9 10 10 0 1 NULL
+ t125 b 4 INT 9 10 10 0 1 NULL
+ t125 c 4 INT 9 10 10 0 1 NULL
+ t125 d 4 INT 9 10 10 0 1 NULL
+ t125 e 4 INT 9 10 10 0 1 NULL
+ t126 a 4 INT 9 10 10 0 1 NULL
+ t126 b 4 INT 9 10 10 0 1 NULL
+ t126 c 4 INT 9 10 10 0 1 NULL
+ t126 d 4 INT 9 10 10 0 1 NULL
+ t126 e 4 INT 9 10 10 0 1 NULL
+ t127 a 4 INT 9 10 10 0 1 NULL
+ t127 b 4 INT 9 10 10 0 1 NULL
+ t127 c 4 INT 9 10 10 0 1 NULL
+ t127 d 4 INT 9 10 10 0 1 NULL
+ t127 e 4 INT 9 10 10 0 1 NULL
+ t128 a 4 INT 9 10 10 0 1 NULL
+ t128 b 4 INT 9 10 10 0 1 NULL
+ t128 c 4 INT 9 10 10 0 1 NULL
+ t128 d 4 INT 9 10 10 0 1 NULL
+ t128 e 4 INT 9 10 10 0 1 NULL
+ t129 a 4 INT 9 10 10 0 1 NULL
+ t129 b 4 INT 9 10 10 0 1 NULL
+ t129 c 4 INT 9 10 10 0 1 NULL
+ t129 d 4 INT 9 10 10 0 1 NULL
+ t129 e 4 INT 9 10 10 0 1 NULL
+ t130 a 4 INT 9 10 10 0 1 NULL
+ t130 b 4 INT 9 10 10 0 1 NULL
+ t130 c 4 INT 9 10 10 0 1 NULL
+ t130 d 4 INT 9 10 10 0 1 NULL
+ t130 e 4 INT 9 10 10 0 1 NULL
+ t131 a 4 INT 9 10 10 0 1 NULL
+ t131 b 4 INT 9 10 10 0 1 NULL
+ t131 c 4 INT 9 10 10 0 1 NULL
+ t131 d 4 INT 9 10 10 0 1 NULL
+ t131 e 4 INT 9 10 10 0 1 NULL
+ t132 a 4 INT 9 10 10 0 1 NULL
+ t132 b 4 INT 9 10 10 0 1 NULL
+ t132 c 4 INT 9 10 10 0 1 NULL
+ t132 d 4 INT 9 10 10 0 1 NULL
+ t132 e 4 INT 9 10 10 0 1 NULL
+ t133 a 4 INT 9 10 10 0 1 NULL
+ t133 b 4 INT 9 10 10 0 1 NULL
+ t133 c 4 INT 9 10 10 0 1 NULL
+ t133 d 4 INT 9 10 10 0 1 NULL
+ t133 e 4 INT 9 10 10 0 1 NULL
+ t134 a 4 INT 9 10 10 0 1 NULL
+ t134 b 4 INT 9 10 10 0 1 NULL
+ t134 c 4 INT 9 10 10 0 1 NULL
+ t134 d 4 INT 9 10 10 0 1 NULL
+ t134 e 4 INT 9 10 10 0 1 NULL
+ t135 a 4 INT 9 10 10 0 1 NULL
+ t135 b 4 INT 9 10 10 0 1 NULL
+ t135 c 4 INT 9 10 10 0 1 NULL
+ t135 d 4 INT 9 10 10 0 1 NULL
+ t135 e 4 INT 9 10 10 0 1 NULL
+ t136 a 4 INT 9 10 10 0 1 NULL
+ t136 b 4 INT 9 10 10 0 1 NULL
+ t136 c 4 INT 9 10 10 0 1 NULL
+ t136 d 4 INT 9 10 10 0 1 NULL
+ t136 e 4 INT 9 10 10 0 1 NULL
+ t137 a 4 INT 9 10 10 0 1 NULL
+ t137 b 4 INT 9 10 10 0 1 NULL
+ t137 c 4 INT 9 10 10 0 1 NULL
+ t137 d 4 INT 9 10 10 0 1 NULL
+ t137 e 4 INT 9 10 10 0 1 NULL
+ t138 a 4 INT 9 10 10 0 1 NULL
+ t138 b 4 INT 9 10 10 0 1 NULL
+ t138 c 4 INT 9 10 10 0 1 NULL
+ t138 d 4 INT 9 10 10 0 1 NULL
+ t138 e 4 INT 9 10 10 0 1 NULL
+ t139 a 4 INT 9 10 10 0 1 NULL
+ t139 b 4 INT 9 10 10 0 1 NULL
+ t139 c 4 INT 9 10 10 0 1 NULL
+ t139 d 4 INT 9 10 10 0 1 NULL
+ t139 e 4 INT 9 10 10 0 1 NULL
+ t140 a 4 INT 9 10 10 0 1 NULL
+ t140 b 4 INT 9 10 10 0 1 NULL
+ t140 c 4 INT 9 10 10 0 1 NULL
+ t140 d 4 INT 9 10 10 0 1 NULL
+ t140 e 4 INT 9 10 10 0 1 NULL
+ t141 a 4 INT 9 10 10 0 1 NULL
+ t141 b 4 INT 9 10 10 0 1 NULL
+ t141 c 4 INT 9 10 10 0 1 NULL
+ t141 d 4 INT 9 10 10 0 1 NULL
+ t141 e 4 INT 9 10 10 0 1 NULL
+ t142 a 4 INT 9 10 10 0 1 NULL
+ t142 b 4 INT 9 10 10 0 1 NULL
+ t142 c 4 INT 9 10 10 0 1 NULL
+ t142 d 4 INT 9 10 10 0 1 NULL
+ t142 e 4 INT 9 10 10 0 1 NULL
+ t143 a 4 INT 9 10 10 0 1 NULL
+ t143 b 4 INT 9 10 10 0 1 NULL
+ t143 c 4 INT 9 10 10 0 1 NULL
+ t143 d 4 INT 9 10 10 0 1 NULL
+ t143 e 4 INT 9 10 10 0 1 NULL
+ t144 a 4 INT 9 10 10 0 1 NULL
+ t144 b 4 INT 9 10 10 0 1 NULL
+ t144 c 4 INT 9 10 10 0 1 NULL
+ t144 d 4 INT 9 10 10 0 1 NULL
+ t144 e 4 INT 9 10 10 0 1 NULL
+ t145 a 4 INT 9 10 10 0 1 NULL
+ t145 b 4 INT 9 10 10 0 1 NULL
+ t145 c 4 INT 9 10 10 0 1 NULL
+ t145 d 4 INT 9 10 10 0 1 NULL
+ t145 e 4 INT 9 10 10 0 1 NULL
+ t146 a 4 INT 9 10 10 0 1 NULL
+ t146 b 4 INT 9 10 10 0 1 NULL
+ t146 c 4 INT 9 10 10 0 1 NULL
+ t146 d 4 INT 9 10 10 0 1 NULL
+ t146 e 4 INT 9 10 10 0 1 NULL
+ t147 a 4 INT 9 10 10 0 1 NULL
+ t147 b 4 INT 9 10 10 0 1 NULL
+ t147 c 4 INT 9 10 10 0 1 NULL
+ t147 d 4 INT 9 10 10 0 1 NULL
+ t147 e 4 INT 9 10 10 0 1 NULL
+ t148 a 4 INT 9 10 10 0 1 NULL
+ t148 b 4 INT 9 10 10 0 1 NULL
+ t148 c 4 INT 9 10 10 0 1 NULL
+ t148 d 4 INT 9 10 10 0 1 NULL
+ t148 e 4 INT 9 10 10 0 1 NULL
+ t149 a 4 INT 9 10 10 0 1 NULL
+ t149 b 4 INT 9 10 10 0 1 NULL
+ t149 c 4 INT 9 10 10 0 1 NULL
+ t149 d 4 INT 9 10 10 0 1 NULL
+ t149 e 4 INT 9 10 10 0 1 NULL
+ t150 a 4 INT 9 10 10 0 1 NULL
+ t150 b 4 INT 9 10 10 0 1 NULL
+ t150 c 4 INT 9 10 10 0 1 NULL
+ t150 d 4 INT 9 10 10 0 1 NULL
+ t150 e 4 INT 9 10 10 0 1 NULL
+ t151 a 4 INT 9 10 10 0 1 NULL
+ t151 b 4 INT 9 10 10 0 1 NULL
+ t151 c 4 INT 9 10 10 0 1 NULL
+ t151 d 4 INT 9 10 10 0 1 NULL
+ t151 e 4 INT 9 10 10 0 1 NULL
+ t152 a 4 INT 9 10 10 0 1 NULL
+ t152 b 4 INT 9 10 10 0 1 NULL
+ t152 c 4 INT 9 10 10 0 1 NULL
+ t152 d 4 INT 9 10 10 0 1 NULL
+ t152 e 4 INT 9 10 10 0 1 NULL
+ t153 a 4 INT 9 10 10 0 1 NULL
+ t153 b 4 INT 9 10 10 0 1 NULL
+ t153 c 4 INT 9 10 10 0 1 NULL
+ t153 d 4 INT 9 10 10 0 1 NULL
+ t153 e 4 INT 9 10 10 0 1 NULL
+ t154 a 4 INT 9 10 10 0 1 NULL
+ t154 b 4 INT 9 10 10 0 1 NULL
+ t154 c 4 INT 9 10 10 0 1 NULL
+ t154 d 4 INT 9 10 10 0 1 NULL
+ t154 e 4 INT 9 10 10 0 1 NULL
+ t155 a 4 INT 9 10 10 0 1 NULL
+ t155 b 4 INT 9 10 10 0 1 NULL
+ t155 c 4 INT 9 10 10 0 1 NULL
+ t155 d 4 INT 9 10 10 0 1 NULL
+ t155 e 4 INT 9 10 10 0 1 NULL
+ t156 a 4 INT 9 10 10 0 1 NULL
+ t156 b 4 INT 9 10 10 0 1 NULL
+ t156 c 4 INT 9 10 10 0 1 NULL
+ t156 d 4 INT 9 10 10 0 1 NULL
+ t156 e 4 INT 9 10 10 0 1 NULL
+ t157 a 4 INT 9 10 10 0 1 NULL
+ t157 b 4 INT 9 10 10 0 1 NULL
+ t157 c 4 INT 9 10 10 0 1 NULL
+ t157 d 4 INT 9 10 10 0 1 NULL
+ t157 e 4 INT 9 10 10 0 1 NULL
+ t158 a 4 INT 9 10 10 0 1 NULL
+ t158 b 4 INT 9 10 10 0 1 NULL
+ t158 c 4 INT 9 10 10 0 1 NULL
+ t158 d 4 INT 9 10 10 0 1 NULL
+ t158 e 4 INT 9 10 10 0 1 NULL
+ t159 a 4 INT 9 10 10 0 1 NULL
+ t159 b 4 INT 9 10 10 0 1 NULL
+ t159 c 4 INT 9 10 10 0 1 NULL
+ t159 d 4 INT 9 10 10 0 1 NULL
+ t159 e 4 INT 9 10 10 0 1 NULL
+ t160 a 4 INT 9 10 10 0 1 NULL
+ t160 b 4 INT 9 10 10 0 1 NULL
+ t160 c 4 INT 9 10 10 0 1 NULL
+ t160 d 4 INT 9 10 10 0 1 NULL
+ t160 e 4 INT 9 10 10 0 1 NULL
+ t161 a 4 INT 9 10 10 0 1 NULL
+ t161 b 4 INT 9 10 10 0 1 NULL
+ t161 c 4 INT 9 10 10 0 1 NULL
+ t161 d 4 INT 9 10 10 0 1 NULL
+ t161 e 4 INT 9 10 10 0 1 NULL
+ t162 a 4 INT 9 10 10 0 1 NULL
+ t162 b 4 INT 9 10 10 0 1 NULL
+ t162 c 4 INT 9 10 10 0 1 NULL
+ t162 d 4 INT 9 10 10 0 1 NULL
+ t162 e 4 INT 9 10 10 0 1 NULL
+ t163 a 4 INT 9 10 10 0 1 NULL
+ t163 b 4 INT 9 10 10 0 1 NULL
+ t163 c 4 INT 9 10 10 0 1 NULL
+ t163 d 4 INT 9 10 10 0 1 NULL
+ t163 e 4 INT 9 10 10 0 1 NULL
+ t164 a 4 INT 9 10 10 0 1 NULL
+ t164 b 4 INT 9 10 10 0 1 NULL
+ t164 c 4 INT 9 10 10 0 1 NULL
+ t164 d 4 INT 9 10 10 0 1 NULL
+ t164 e 4 INT 9 10 10 0 1 NULL
+ t165 a 4 INT 9 10 10 0 1 NULL
+ t165 b 4 INT 9 10 10 0 1 NULL
+ t165 c 4 INT 9 10 10 0 1 NULL
+ t165 d 4 INT 9 10 10 0 1 NULL
+ t165 e 4 INT 9 10 10 0 1 NULL
+ t166 a 4 INT 9 10 10 0 1 NULL
+ t166 b 4 INT 9 10 10 0 1 NULL
+ t166 c 4 INT 9 10 10 0 1 NULL
+ t166 d 4 INT 9 10 10 0 1 NULL
+ t166 e 4 INT 9 10 10 0 1 NULL
+ t167 a 4 INT 9 10 10 0 1 NULL
+ t167 b 4 INT 9 10 10 0 1 NULL
+ t167 c 4 INT 9 10 10 0 1 NULL
+ t167 d 4 INT 9 10 10 0 1 NULL
+ t167 e 4 INT 9 10 10 0 1 NULL
+ t168 a 4 INT 9 10 10 0 1 NULL
+ t168 b 4 INT 9 10 10 0 1 NULL
+ t168 c 4 INT 9 10 10 0 1 NULL
+ t168 d 4 INT 9 10 10 0 1 NULL
+ t168 e 4 INT 9 10 10 0 1 NULL
+ t169 a 4 INT 9 10 10 0 1 NULL
+ t169 b 4 INT 9 10 10 0 1 NULL
+ t169 c 4 INT 9 10 10 0 1 NULL
+ t169 d 4 INT 9 10 10 0 1 NULL
+ t169 e 4 INT 9 10 10 0 1 NULL
+ t170 a 4 INT 9 10 10 0 1 NULL
+ t170 b 4 INT 9 10 10 0 1 NULL
+ t170 c 4 INT 9 10 10 0 1 NULL
+ t170 d 4 INT 9 10 10 0 1 NULL
+ t170 e 4 INT 9 10 10 0 1 NULL
+ t171 a 4 INT 9 10 10 0 1 NULL
+ t171 b 4 INT 9 10 10 0 1 NULL
+ t171 c 4 INT 9 10 10 0 1 NULL
+ t171 d 4 INT 9 10 10 0 1 NULL
+ t171 e 4 INT 9 10 10 0 1 NULL
+ t172 a 4 INT 9 10 10 0 1 NULL
+ t172 b 4 INT 9 10 10 0 1 NULL
+ t172 c 4 INT 9 10 10 0 1 NULL
+ t172 d 4 INT 9 10 10 0 1 NULL
+ t172 e 4 INT 9 10 10 0 1 NULL
+ t173 a 4 INT 9 10 10 0 1 NULL
+ t173 b 4 INT 9 10 10 0 1 NULL
+ t173 c 4 INT 9 10 10 0 1 NULL
+ t173 d 4 INT 9 10 10 0 1 NULL
+ t173 e 4 INT 9 10 10 0 1 NULL
+ t174 a 4 INT 9 10 10 0 1 NULL
+ t174 b 4 INT 9 10 10 0 1 NULL
+ t174 c 4 INT 9 10 10 0 1 NULL
+ t174 d 4 INT 9 10 10 0 1 NULL
+ t174 e 4 INT 9 10 10 0 1 NULL
+ t175 a 4 INT 9 10 10 0 1 NULL
+ t175 b 4 INT 9 10 10 0 1 NULL
+ t175 c 4 INT 9 10 10 0 1 NULL
+ t175 d 4 INT 9 10 10 0 1 NULL
+ t175 e 4 INT 9 10 10 0 1 NULL
+ t176 a 4 INT 9 10 10 0 1 NULL
+ t176 b 4 INT 9 10 10 0 1 NULL
+ t176 c 4 INT 9 10 10 0 1 NULL
+ t176 d 4 INT 9 10 10 0 1 NULL
+ t176 e 4 INT 9 10 10 0 1 NULL
+ t177 a 4 INT 9 10 10 0 1 NULL
+ t177 b 4 INT 9 10 10 0 1 NULL
+ t177 c 4 INT 9 10 10 0 1 NULL
+ t177 d 4 INT 9 10 10 0 1 NULL
+ t177 e 4 INT 9 10 10 0 1 NULL
+ t178 a 4 INT 9 10 10 0 1 NULL
+ t178 b 4 INT 9 10 10 0 1 NULL
+ t178 c 4 INT 9 10 10 0 1 NULL
+ t178 d 4 INT 9 10 10 0 1 NULL
+ t178 e 4 INT 9 10 10 0 1 NULL
+ t179 a 4 INT 9 10 10 0 1 NULL
+ t179 b 4 INT 9 10 10 0 1 NULL
+ t179 c 4 INT 9 10 10 0 1 NULL
+ t179 d 4 INT 9 10 10 0 1 NULL
+ t179 e 4 INT 9 10 10 0 1 NULL
+ t180 a 4 INT 9 10 10 0 1 NULL
+ t180 b 4 INT 9 10 10 0 1 NULL
+ t180 c 4 INT 9 10 10 0 1 NULL
+ t180 d 4 INT 9 10 10 0 1 NULL
+ t180 e 4 INT 9 10 10 0 1 NULL
+ t181 a 4 INT 9 10 10 0 1 NULL
+ t181 b 4 INT 9 10 10 0 1 NULL
+ t181 c 4 INT 9 10 10 0 1 NULL
+ t181 d 4 INT 9 10 10 0 1 NULL
+ t181 e 4 INT 9 10 10 0 1 NULL
+ t182 a 4 INT 9 10 10 0 1 NULL
+ t182 b 4 INT 9 10 10 0 1 NULL
+ t182 c 4 INT 9 10 10 0 1 NULL
+ t182 d 4 INT 9 10 10 0 1 NULL
+ t182 e 4 INT 9 10 10 0 1 NULL
+ t183 a 4 INT 9 10 10 0 1 NULL
+ t183 b 4 INT 9 10 10 0 1 NULL
+ t183 c 4 INT 9 10 10 0 1 NULL
+ t183 d 4 INT 9 10 10 0 1 NULL
+ t183 e 4 INT 9 10 10 0 1 NULL
+ t184 a 4 INT 9 10 10 0 1 NULL
+ t184 b 4 INT 9 10 10 0 1 NULL
+ t184 c 4 INT 9 10 10 0 1 NULL
+ t184 d 4 INT 9 10 10 0 1 NULL
+ t184 e 4 INT 9 10 10 0 1 NULL
+ t185 a 4 INT 9 10 10 0 1 NULL
+ t185 b 4 INT 9 10 10 0 1 NULL
+ t185 c 4 INT 9 10 10 0 1 NULL
+ t185 d 4 INT 9 10 10 0 1 NULL
+ t185 e 4 INT 9 10 10 0 1 NULL
+ t186 a 4 INT 9 10 10 0 1 NULL
+ t186 b 4 INT 9 10 10 0 1 NULL
+ t186 c 4 INT 9 10 10 0 1 NULL
+ t186 d 4 INT 9 10 10 0 1 NULL
+ t186 e 4 INT 9 10 10 0 1 NULL
+ t187 a 4 INT 9 10 10 0 1 NULL
+ t187 b 4 INT 9 10 10 0 1 NULL
+ t187 c 4 INT 9 10 10 0 1 NULL
+ t187 d 4 INT 9 10 10 0 1 NULL
+ t187 e 4 INT 9 10 10 0 1 NULL
+ t188 a 4 INT 9 10 10 0 1 NULL
+ t188 b 4 INT 9 10 10 0 1 NULL
+ t188 c 4 INT 9 10 10 0 1 NULL
+ t188 d 4 INT 9 10 10 0 1 NULL
+ t188 e 4 INT 9 10 10 0 1 NULL
+ t189 a 4 INT 9 10 10 0 1 NULL
+ t189 b 4 INT 9 10 10 0 1 NULL
+ t189 c 4 INT 9 10 10 0 1 NULL
+ t189 d 4 INT 9 10 10 0 1 NULL
+ t189 e 4 INT 9 10 10 0 1 NULL
+ t190 a 4 INT 9 10 10 0 1 NULL
+ t190 b 4 INT 9 10 10 0 1 NULL
+ t190 c 4 INT 9 10 10 0 1 NULL
+ t190 d 4 INT 9 10 10 0 1 NULL
+ t190 e 4 INT 9 10 10 0 1 NULL
+ t191 a 4 INT 9 10 10 0 1 NULL
+ t191 b 4 INT 9 10 10 0 1 NULL
+ t191 c 4 INT 9 10 10 0 1 NULL
+ t191 d 4 INT 9 10 10 0 1 NULL
+ t191 e 4 INT 9 10 10 0 1 NULL
+ t192 a 4 INT 9 10 10 0 1 NULL
+ t192 b 4 INT 9 10 10 0 1 NULL
+ t192 c 4 INT 9 10 10 0 1 NULL
+ t192 d 4 INT 9 10 10 0 1 NULL
+ t192 e 4 INT 9 10 10 0 1 NULL
+ t193 a 4 INT 9 10 10 0 1 NULL
+ t193 b 4 INT 9 10 10 0 1 NULL
+ t193 c 4 INT 9 10 10 0 1 NULL
+ t193 d 4 INT 9 10 10 0 1 NULL
+ t193 e 4 INT 9 10 10 0 1 NULL
+ t194 a 4 INT 9 10 10 0 1 NULL
+ t194 b 4 INT 9 10 10 0 1 NULL
+ t194 c 4 INT 9 10 10 0 1 NULL
+ t194 d 4 INT 9 10 10 0 1 NULL
+ t194 e 4 INT 9 10 10 0 1 NULL
+ t195 a 4 INT 9 10 10 0 1 NULL
+ t195 b 4 INT 9 10 10 0 1 NULL
+ t195 c 4 INT 9 10 10 0 1 NULL
+ t195 d 4 INT 9 10 10 0 1 NULL
+ t195 e 4 INT 9 10 10 0 1 NULL
+ t196 a 4 INT 9 10 10 0 1 NULL
+ t196 b 4 INT 9 10 10 0 1 NULL
+ t196 c 4 INT 9 10 10 0 1 NULL
+ t196 d 4 INT 9 10 10 0 1 NULL
+ t196 e 4 INT 9 10 10 0 1 NULL
+ t197 a 4 INT 9 10 10 0 1 NULL
+ t197 b 4 INT 9 10 10 0 1 NULL
+ t197 c 4 INT 9 10 10 0 1 NULL
+ t197 d 4 INT 9 10 10 0 1 NULL
+ t197 e 4 INT 9 10 10 0 1 NULL
+ t198 a 4 INT 9 10 10 0 1 NULL
+ t198 b 4 INT 9 10 10 0 1 NULL
+ t198 c 4 INT 9 10 10 0 1 NULL
+ t198 d 4 INT 9 10 10 0 1 NULL
+ t198 e 4 INT 9 10 10 0 1 NULL
+ t199 a 4 INT 9 10 10 0 1 NULL
+ t199 b 4 INT 9 10 10 0 1 NULL
+ t199 c 4 INT 9 10 10 0 1 NULL
+ t199 d 4 INT 9 10 10 0 1 NULL
+ t199 e 4 INT 9 10 10 0 1 NULL
+ t200 a 4 INT 9 10 10 0 1 NULL
+ t200 b 4 INT 9 10 10 0 1 NULL
+ t200 c 4 INT 9 10 10 0 1 NULL
+ t200 d 4 INT 9 10 10 0 1 NULL
+ t200 e 4 INT 9 10 10 0 1 NULL
+ t201 a 4 INT 9 10 10 0 1 NULL
+ t201 b 4 INT 9 10 10 0 1 NULL
+ t201 c 4 INT 9 10 10 0 1 NULL
+ t201 d 4 INT 9 10 10 0 1 NULL
+ t201 e 4 INT 9 10 10 0 1 NULL
+ t202 a 4 INT 9 10 10 0 1 NULL
+ t202 b 4 INT 9 10 10 0 1 NULL
+ t202 c 4 INT 9 10 10 0 1 NULL
+ t202 d 4 INT 9 10 10 0 1 NULL
+ t202 e 4 INT 9 10 10 0 1 NULL
+ t203 a 4 INT 9 10 10 0 1 NULL
+ t203 b 4 INT 9 10 10 0 1 NULL
+ t203 c 4 INT 9 10 10 0 1 NULL
+ t203 d 4 INT 9 10 10 0 1 NULL
+ t203 e 4 INT 9 10 10 0 1 NULL
+ t204 a 4 INT 9 10 10 0 1 NULL
+ t204 b 4 INT 9 10 10 0 1 NULL
+ t204 c 4 INT 9 10 10 0 1 NULL
+ t204 d 4 INT 9 10 10 0 1 NULL
+ t204 e 4 INT 9 10 10 0 1 NULL
+ t205 a 4 INT 9 10 10 0 1 NULL
+ t205 b 4 INT 9 10 10 0 1 NULL
+ t205 c 4 INT 9 10 10 0 1 NULL
+ t205 d 4 INT 9 10 10 0 1 NULL
+ t205 e 4 INT 9 10 10 0 1 NULL
+ t206 a 4 INT 9 10 10 0 1 NULL
+ t206 b 4 INT 9 10 10 0 1 NULL
+ t206 c 4 INT 9 10 10 0 1 NULL
+ t206 d 4 INT 9 10 10 0 1 NULL
+ t206 e 4 INT 9 10 10 0 1 NULL
+ t207 a 4 INT 9 10 10 0 1 NULL
+ t207 b 4 INT 9 10 10 0 1 NULL
+ t207 c 4 INT 9 10 10 0 1 NULL
+ t207 d 4 INT 9 10 10 0 1 NULL
+ t207 e 4 INT 9 10 10 0 1 NULL
+ t208 a 4 INT 9 10 10 0 1 NULL
+ t208 b 4 INT 9 10 10 0 1 NULL
+ t208 c 4 INT 9 10 10 0 1 NULL
+ t208 d 4 INT 9 10 10 0 1 NULL
+ t208 e 4 INT 9 10 10 0 1 NULL
+ t209 a 4 INT 9 10 10 0 1 NULL
+ t209 b 4 INT 9 10 10 0 1 NULL
+ t209 c 4 INT 9 10 10 0 1 NULL
+ t209 d 4 INT 9 10 10 0 1 NULL
+ t209 e 4 INT 9 10 10 0 1 NULL
+ t210 a 4 INT 9 10 10 0 1 NULL
+ t210 b 4 INT 9 10 10 0 1 NULL
+ t210 c 4 INT 9 10 10 0 1 NULL
+ t210 d 4 INT 9 10 10 0 1 NULL
+ t210 e 4 INT 9 10 10 0 1 NULL
+ t211 a 4 INT 9 10 10 0 1 NULL
+ t211 b 4 INT 9 10 10 0 1 NULL
+ t211 c 4 INT 9 10 10 0 1 NULL
+ t211 d 4 INT 9 10 10 0 1 NULL
+ t211 e 4 INT 9 10 10 0 1 NULL
+ t212 a 4 INT 9 10 10 0 1 NULL
+ t212 b 4 INT 9 10 10 0 1 NULL
+ t212 c 4 INT 9 10 10 0 1 NULL
+ t212 d 4 INT 9 10 10 0 1 NULL
+ t212 e 4 INT 9 10 10 0 1 NULL
+ t213 a 4 INT 9 10 10 0 1 NULL
+ t213 b 4 INT 9 10 10 0 1 NULL
+ t213 c 4 INT 9 10 10 0 1 NULL
+ t213 d 4 INT 9 10 10 0 1 NULL
+ t213 e 4 INT 9 10 10 0 1 NULL
+ t214 a 4 INT 9 10 10 0 1 NULL
+ t214 b 4 INT 9 10 10 0 1 NULL
+ t214 c 4 INT 9 10 10 0 1 NULL
+ t214 d 4 INT 9 10 10 0 1 NULL
+ t214 e 4 INT 9 10 10 0 1 NULL
+ t215 a 4 INT 9 10 10 0 1 NULL
+ t215 b 4 INT 9 10 10 0 1 NULL
+ t215 c 4 INT 9 10 10 0 1 NULL
+ t215 d 4 INT 9 10 10 0 1 NULL
+ t215 e 4 INT 9 10 10 0 1 NULL
+ t216 a 4 INT 9 10 10 0 1 NULL
+ t216 b 4 INT 9 10 10 0 1 NULL
+ t216 c 4 INT 9 10 10 0 1 NULL
+ t216 d 4 INT 9 10 10 0 1 NULL
+ t216 e 4 INT 9 10 10 0 1 NULL
+ t217 a 4 INT 9 10 10 0 1 NULL
+ t217 b 4 INT 9 10 10 0 1 NULL
+ t217 c 4 INT 9 10 10 0 1 NULL
+ t217 d 4 INT 9 10 10 0 1 NULL
+ t217 e 4 INT 9 10 10 0 1 NULL
+ t218 a 4 INT 9 10 10 0 1 NULL
+ t218 b 4 INT 9 10 10 0 1 NULL
+ t218 c 4 INT 9 10 10 0 1 NULL
+ t218 d 4 INT 9 10 10 0 1 NULL
+ t218 e 4 INT 9 10 10 0 1 NULL
+ t219 a 4 INT 9 10 10 0 1 NULL
+ t219 b 4 INT 9 10 10 0 1 NULL
+ t219 c 4 INT 9 10 10 0 1 NULL
+ t219 d 4 INT 9 10 10 0 1 NULL
+ t219 e 4 INT 9 10 10 0 1 NULL
+ t220 a 4 INT 9 10 10 0 1 NULL
+ t220 b 4 INT 9 10 10 0 1 NULL
+ t220 c 4 INT 9 10 10 0 1 NULL
+ t220 d 4 INT 9 10 10 0 1 NULL
+ t220 e 4 INT 9 10 10 0 1 NULL
+ t221 a 4 INT 9 10 10 0 1 NULL
+ t221 b 4 INT 9 10 10 0 1 NULL
+ t221 c 4 INT 9 10 10 0 1 NULL
+ t221 d 4 INT 9 10 10 0 1 NULL
+ t221 e 4 INT 9 10 10 0 1 NULL
+ t222 a 4 INT 9 10 10 0 1 NULL
+ t222 b 4 INT 9 10 10 0 1 NULL
+ t222 c 4 INT 9 10 10 0 1 NULL
+ t222 d 4 INT 9 10 10 0 1 NULL
+ t222 e 4 INT 9 10 10 0 1 NULL
+ t223 a 4 INT 9 10 10 0 1 NULL
+ t223 b 4 INT 9 10 10 0 1 NULL
+ t223 c 4 INT 9 10 10 0 1 NULL
+ t223 d 4 INT 9 10 10 0 1 NULL
+ t223 e 4 INT 9 10 10 0 1 NULL
+ t224 a 4 INT 9 10 10 0 1 NULL
+ t224 b 4 INT 9 10 10 0 1 NULL
+ t224 c 4 INT 9 10 10 0 1 NULL
+ t224 d 4 INT 9 10 10 0 1 NULL
+ t224 e 4 INT 9 10 10 0 1 NULL
+ t225 a 4 INT 9 10 10 0 1 NULL
+ t225 b 4 INT 9 10 10 0 1 NULL
+ t225 c 4 INT 9 10 10 0 1 NULL
+ t225 d 4 INT 9 10 10 0 1 NULL
+ t225 e 4 INT 9 10 10 0 1 NULL
+ t226 a 4 INT 9 10 10 0 1 NULL
+ t226 b 4 INT 9 10 10 0 1 NULL
+ t226 c 4 INT 9 10 10 0 1 NULL
+ t226 d 4 INT 9 10 10 0 1 NULL
+ t226 e 4 INT 9 10 10 0 1 NULL
+ t227 a 4 INT 9 10 10 0 1 NULL
+ t227 b 4 INT 9 10 10 0 1 NULL
+ t227 c 4 INT 9 10 10 0 1 NULL
+ t227 d 4 INT 9 10 10 0 1 NULL
+ t227 e 4 INT 9 10 10 0 1 NULL
+ t228 a 4 INT 9 10 10 0 1 NULL
+ t228 b 4 INT 9 10 10 0 1 NULL
+ t228 c 4 INT 9 10 10 0 1 NULL
+ t228 d 4 INT 9 10 10 0 1 NULL
+ t228 e 4 INT 9 10 10 0 1 NULL
+ t229 a 4 INT 9 10 10 0 1 NULL
+ t229 b 4 INT 9 10 10 0 1 NULL
+ t229 c 4 INT 9 10 10 0 1 NULL
+ t229 d 4 INT 9 10 10 0 1 NULL
+ t229 e 4 INT 9 10 10 0 1 NULL
+ t230 a 4 INT 9 10 10 0 1 NULL
+ t230 b 4 INT 9 10 10 0 1 NULL
+ t230 c 4 INT 9 10 10 0 1 NULL
+ t230 d 4 INT 9 10 10 0 1 NULL
+ t230 e 4 INT 9 10 10 0 1 NULL
+ t231 a 4 INT 9 10 10 0 1 NULL
+ t231 b 4 INT 9 10 10 0 1 NULL
+ t231 c 4 INT 9 10 10 0 1 NULL
+ t231 d 4 INT 9 10 10 0 1 NULL
+ t231 e 4 INT 9 10 10 0 1 NULL
+ t232 a 4 INT 9 10 10 0 1 NULL
+ t232 b 4 INT 9 10 10 0 1 NULL
+ t232 c 4 INT 9 10 10 0 1 NULL
+ t232 d 4 INT 9 10 10 0 1 NULL
+ t232 e 4 INT 9 10 10 0 1 NULL
+ t233 a 4 INT 9 10 10 0 1 NULL
+ t233 b 4 INT 9 10 10 0 1 NULL
+ t233 c 4 INT 9 10 10 0 1 NULL
+ t233 d 4 INT 9 10 10 0 1 NULL
+ t233 e 4 INT 9 10 10 0 1 NULL
+ t234 a 4 INT 9 10 10 0 1 NULL
+ t234 b 4 INT 9 10 10 0 1 NULL
+ t234 c 4 INT 9 10 10 0 1 NULL
+ t234 d 4 INT 9 10 10 0 1 NULL
+ t234 e 4 INT 9 10 10 0 1 NULL
+ t235 a 4 INT 9 10 10 0 1 NULL
+ t235 b 4 INT 9 10 10 0 1 NULL
+ t235 c 4 INT 9 10 10 0 1 NULL
+ t235 d 4 INT 9 10 10 0 1 NULL
+ t235 e 4 INT 9 10 10 0 1 NULL
+ t236 a 4 INT 9 10 10 0 1 NULL
+ t236 b 4 INT 9 10 10 0 1 NULL
+ t236 c 4 INT 9 10 10 0 1 NULL
+ t236 d 4 INT 9 10 10 0 1 NULL
+ t236 e 4 INT 9 10 10 0 1 NULL
+ t237 a 4 INT 9 10 10 0 1 NULL
+ t237 b 4 INT 9 10 10 0 1 NULL
+ t237 c 4 INT 9 10 10 0 1 NULL
+ t237 d 4 INT 9 10 10 0 1 NULL
+ t237 e 4 INT 9 10 10 0 1 NULL
+ t238 a 4 INT 9 10 10 0 1 NULL
+ t238 b 4 INT 9 10 10 0 1 NULL
+ t238 c 4 INT 9 10 10 0 1 NULL
+ t238 d 4 INT 9 10 10 0 1 NULL
+ t238 e 4 INT 9 10 10 0 1 NULL
+ t239 a 4 INT 9 10 10 0 1 NULL
+ t239 b 4 INT 9 10 10 0 1 NULL
+ t239 c 4 INT 9 10 10 0 1 NULL
+ t239 d 4 INT 9 10 10 0 1 NULL
+ t239 e 4 INT 9 10 10 0 1 NULL
+ t240 a 4 INT 9 10 10 0 1 NULL
+ t240 b 4 INT 9 10 10 0 1 NULL
+ t240 c 4 INT 9 10 10 0 1 NULL
+ t240 d 4 INT 9 10 10 0 1 NULL
+ t240 e 4 INT 9 10 10 0 1 NULL
+ t241 a 4 INT 9 10 10 0 1 NULL
+ t241 b 4 INT 9 10 10 0 1 NULL
+ t241 c 4 INT 9 10 10 0 1 NULL
+ t241 d 4 INT 9 10 10 0 1 NULL
+ t241 e 4 INT 9 10 10 0 1 NULL
+ t242 a 4 INT 9 10 10 0 1 NULL
+ t242 b 4 INT 9 10 10 0 1 NULL
+ t242 c 4 INT 9 10 10 0 1 NULL
+ t242 d 4 INT 9 10 10 0 1 NULL
+ t242 e 4 INT 9 10 10 0 1 NULL
+ t243 a 4 INT 9 10 10 0 1 NULL
+ t243 b 4 INT 9 10 10 0 1 NULL
+ t243 c 4 INT 9 10 10 0 1 NULL
+ t243 d 4 INT 9 10 10 0 1 NULL
+ t243 e 4 INT 9 10 10 0 1 NULL
+ t244 a 4 INT 9 10 10 0 1 NULL
+ t244 b 4 INT 9 10 10 0 1 NULL
+ t244 c 4 INT 9 10 10 0 1 NULL
+ t244 d 4 INT 9 10 10 0 1 NULL
+ t244 e 4 INT 9 10 10 0 1 NULL
+ t245 a 4 INT 9 10 10 0 1 NULL
+ t245 b 4 INT 9 10 10 0 1 NULL
+ t245 c 4 INT 9 10 10 0 1 NULL
+ t245 d 4 INT 9 10 10 0 1 NULL
+ t245 e 4 INT 9 10 10 0 1 NULL
+ t246 a 4 INT 9 10 10 0 1 NULL
+ t246 b 4 INT 9 10 10 0 1 NULL
+ t246 c 4 INT 9 10 10 0 1 NULL
+ t246 d 4 INT 9 10 10 0 1 NULL
+ t246 e 4 INT 9 10 10 0 1 NULL
+ t247 a 4 INT 9 10 10 0 1 NULL
+ t247 b 4 INT 9 10 10 0 1 NULL
+ t247 c 4 INT 9 10 10 0 1 NULL
+ t247 d 4 INT 9 10 10 0 1 NULL
+ t247 e 4 INT 9 10 10 0 1 NULL
+ t248 a 4 INT 9 10 10 0 1 NULL
+ t248 b 4 INT 9 10 10 0 1 NULL
+ t248 c 4 INT 9 10 10 0 1 NULL
+ t248 d 4 INT 9 10 10 0 1 NULL
+ t248 e 4 INT 9 10 10 0 1 NULL
+ t249 a 4 INT 9 10 10 0 1 NULL
+ t249 b 4 INT 9 10 10 0 1 NULL
+ t249 c 4 INT 9 10 10 0 1 NULL
+ t249 d 4 INT 9 10 10 0 1 NULL
+ t249 e 4 INT 9 10 10 0 1 NULL
+ t250 a 4 INT 9 10 10 0 1 NULL
+ t250 b 4 INT 9 10 10 0 1 NULL
+ t250 c 4 INT 9 10 10 0 1 NULL
+ t250 d 4 INT 9 10 10 0 1 NULL
+ t250 e 4 INT 9 10 10 0 1 NULL
+ t251 a 4 INT 9 10 10 0 1 NULL
+ t251 b 4 INT 9 10 10 0 1 NULL
+ t251 c 4 INT 9 10 10 0 1 NULL
+ t251 d 4 INT 9 10 10 0 1 NULL
+ t251 e 4 INT 9 10 10 0 1 NULL
+ t252 a 4 INT 9 10 10 0 1 NULL
+ t252 b 4 INT 9 10 10 0 1 NULL
+ t252 c 4 INT 9 10 10 0 1 NULL
+ t252 d 4 INT 9 10 10 0 1 NULL
+ t252 e 4 INT 9 10 10 0 1 NULL
+ t253 a 4 INT 9 10 10 0 1 NULL
+ t253 b 4 INT 9 10 10 0 1 NULL
+ t253 c 4 INT 9 10 10 0 1 NULL
+ t253 d 4 INT 9 10 10 0 1 NULL
+ t253 e 4 INT 9 10 10 0 1 NULL
+ t254 a 4 INT 9 10 10 0 1 NULL
+ t254 b 4 INT 9 10 10 0 1 NULL
+ t254 c 4 INT 9 10 10 0 1 NULL
+ t254 d 4 INT 9 10 10 0 1 NULL
+ t254 e 4 INT 9 10 10 0 1 NULL
+ t255 a 4 INT 9 10 10 0 1 NULL
+ t255 b 4 INT 9 10 10 0 1 NULL
+ t255 c 4 INT 9 10 10 0 1 NULL
+ t255 d 4 INT 9 10 10 0 1 NULL
+ t255 e 4 INT 9 10 10 0 1 NULL
+ t256 a 4 INT 9 10 10 0 1 NULL
+ t256 b 4 INT 9 10 10 0 1 NULL
+ t256 c 4 INT 9 10 10 0 1 NULL
+ t256 d 4 INT 9 10 10 0 1 NULL
+ t256 e 4 INT 9 10 10 0 1 NULL
+ t257 a 4 INT 9 10 10 0 1 NULL
+ t257 b 4 INT 9 10 10 0 1 NULL
+ t257 c 4 INT 9 10 10 0 1 NULL
+ t257 d 4 INT 9 10 10 0 1 NULL
+ t257 e 4 INT 9 10 10 0 1 NULL
+ t258 a 4 INT 9 10 10 0 1 NULL
+ t258 b 4 INT 9 10 10 0 1 NULL
+ t258 c 4 INT 9 10 10 0 1 NULL
+ t258 d 4 INT 9 10 10 0 1 NULL
+ t258 e 4 INT 9 10 10 0 1 NULL
+ t259 a 4 INT 9 10 10 0 1 NULL
+ t259 b 4 INT 9 10 10 0 1 NULL
+ t259 c 4 INT 9 10 10 0 1 NULL
+ t259 d 4 INT 9 10 10 0 1 NULL
+ t259 e 4 INT 9 10 10 0 1 NULL
+ t260 a 4 INT 9 10 10 0 1 NULL
+ t260 b 4 INT 9 10 10 0 1 NULL
+ t260 c 4 INT 9 10 10 0 1 NULL
+ t260 d 4 INT 9 10 10 0 1 NULL
+ t260 e 4 INT 9 10 10 0 1 NULL
+ t261 a 4 INT 9 10 10 0 1 NULL
+ t261 b 4 INT 9 10 10 0 1 NULL
+ t261 c 4 INT 9 10 10 0 1 NULL
+ t261 d 4 INT 9 10 10 0 1 NULL
+ t261 e 4 INT 9 10 10 0 1 NULL
+ t262 a 4 INT 9 10 10 0 1 NULL
+ t262 b 4 INT 9 10 10 0 1 NULL
+ t262 c 4 INT 9 10 10 0 1 NULL
+ t262 d 4 INT 9 10 10 0 1 NULL
+ t262 e 4 INT 9 10 10 0 1 NULL
+ t263 a 4 INT 9 10 10 0 1 NULL
+ t263 b 4 INT 9 10 10 0 1 NULL
+ t263 c 4 INT 9 10 10 0 1 NULL
+ t263 d 4 INT 9 10 10 0 1 NULL
+ t263 e 4 INT 9 10 10 0 1 NULL
+ t264 a 4 INT 9 10 10 0 1 NULL
+ t264 b 4 INT 9 10 10 0 1 NULL
+ t264 c 4 INT 9 10 10 0 1 NULL
+ t264 d 4 INT 9 10 10 0 1 NULL
+ t264 e 4 INT 9 10 10 0 1 NULL
+ t265 a 4 INT 9 10 10 0 1 NULL
+ t265 b 4 INT 9 10 10 0 1 NULL
+ t265 c 4 INT 9 10 10 0 1 NULL
+ t265 d 4 INT 9 10 10 0 1 NULL
+ t265 e 4 INT 9 10 10 0 1 NULL
+ t266 a 4 INT 9 10 10 0 1 NULL
+ t266 b 4 INT 9 10 10 0 1 NULL
+ t266 c 4 INT 9 10 10 0 1 NULL
+ t266 d 4 INT 9 10 10 0 1 NULL
+ t266 e 4 INT 9 10 10 0 1 NULL
+ t267 a 4 INT 9 10 10 0 1 NULL
+ t267 b 4 INT 9 10 10 0 1 NULL
+ t267 c 4 INT 9 10 10 0 1 NULL
+ t267 d 4 INT 9 10 10 0 1 NULL
+ t267 e 4 INT 9 10 10 0 1 NULL
+ t268 a 4 INT 9 10 10 0 1 NULL
+ t268 b 4 INT 9 10 10 0 1 NULL
+ t268 c 4 INT 9 10 10 0 1 NULL
+ t268 d 4 INT 9 10 10 0 1 NULL
+ t268 e 4 INT 9 10 10 0 1 NULL
+ t269 a 4 INT 9 10 10 0 1 NULL
+ t269 b 4 INT 9 10 10 0 1 NULL
+ t269 c 4 INT 9 10 10 0 1 NULL
+ t269 d 4 INT 9 10 10 0 1 NULL
+ t269 e 4 INT 9 10 10 0 1 NULL
+ t270 a 4 INT 9 10 10 0 1 NULL
+ t270 b 4 INT 9 10 10 0 1 NULL
+ t270 c 4 INT 9 10 10 0 1 NULL
+ t270 d 4 INT 9 10 10 0 1 NULL
+ t270 e 4 INT 9 10 10 0 1 NULL
+ t271 a 4 INT 9 10 10 0 1 NULL
+ t271 b 4 INT 9 10 10 0 1 NULL
+ t271 c 4 INT 9 10 10 0 1 NULL
+ t271 d 4 INT 9 10 10 0 1 NULL
+ t271 e 4 INT 9 10 10 0 1 NULL
+ t272 a 4 INT 9 10 10 0 1 NULL
+ t272 b 4 INT 9 10 10 0 1 NULL
+ t272 c 4 INT 9 10 10 0 1 NULL
+ t272 d 4 INT 9 10 10 0 1 NULL
+ t272 e 4 INT 9 10 10 0 1 NULL
+ t273 a 4 INT 9 10 10 0 1 NULL
+ t273 b 4 INT 9 10 10 0 1 NULL
+ t273 c 4 INT 9 10 10 0 1 NULL
+ t273 d 4 INT 9 10 10 0 1 NULL
+ t273 e 4 INT 9 10 10 0 1 NULL
+ t274 a 4 INT 9 10 10 0 1 NULL
+ t274 b 4 INT 9 10 10 0 1 NULL
+ t274 c 4 INT 9 10 10 0 1 NULL
+ t274 d 4 INT 9 10 10 0 1 NULL
+ t274 e 4 INT 9 10 10 0 1 NULL
+ t275 a 4 INT 9 10 10 0 1 NULL
+ t275 b 4 INT 9 10 10 0 1 NULL
+ t275 c 4 INT 9 10 10 0 1 NULL
+ t275 d 4 INT 9 10 10 0 1 NULL
+ t275 e 4 INT 9 10 10 0 1 NULL
+ t276 a 4 INT 9 10 10 0 1 NULL
+ t276 b 4 INT 9 10 10 0 1 NULL
+ t276 c 4 INT 9 10 10 0 1 NULL
+ t276 d 4 INT 9 10 10 0 1 NULL
+ t276 e 4 INT 9 10 10 0 1 NULL
+ t277 a 4 INT 9 10 10 0 1 NULL
+ t277 b 4 INT 9 10 10 0 1 NULL
+ t277 c 4 INT 9 10 10 0 1 NULL
+ t277 d 4 INT 9 10 10 0 1 NULL
+ t277 e 4 INT 9 10 10 0 1 NULL
+ t278 a 4 INT 9 10 10 0 1 NULL
+ t278 b 4 INT 9 10 10 0 1 NULL
+ t278 c 4 INT 9 10 10 0 1 NULL
+ t278 d 4 INT 9 10 10 0 1 NULL
+ t278 e 4 INT 9 10 10 0 1 NULL
+ t279 a 4 INT 9 10 10 0 1 NULL
+ t279 b 4 INT 9 10 10 0 1 NULL
+ t279 c 4 INT 9 10 10 0 1 NULL
+ t279 d 4 INT 9 10 10 0 1 NULL
+ t279 e 4 INT 9 10 10 0 1 NULL
+ t280 a 4 INT 9 10 10 0 1 NULL
+ t280 b 4 INT 9 10 10 0 1 NULL
+ t280 c 4 INT 9 10 10 0 1 NULL
+ t280 d 4 INT 9 10 10 0 1 NULL
+ t280 e 4 INT 9 10 10 0 1 NULL
+ t281 a 4 INT 9 10 10 0 1 NULL
+ t281 b 4 INT 9 10 10 0 1 NULL
+ t281 c 4 INT 9 10 10 0 1 NULL
+ t281 d 4 INT 9 10 10 0 1 NULL
+ t281 e 4 INT 9 10 10 0 1 NULL
+ t282 a 4 INT 9 10 10 0 1 NULL
+ t282 b 4 INT 9 10 10 0 1 NULL
+ t282 c 4 INT 9 10 10 0 1 NULL
+ t282 d 4 INT 9 10 10 0 1 NULL
+ t282 e 4 INT 9 10 10 0 1 NULL
+ t283 a 4 INT 9 10 10 0 1 NULL
+ t283 b 4 INT 9 10 10 0 1 NULL
+ t283 c 4 INT 9 10 10 0 1 NULL
+ t283 d 4 INT 9 10 10 0 1 NULL
+ t283 e 4 INT 9 10 10 0 1 NULL
+ t284 a 4 INT 9 10 10 0 1 NULL
+ t284 b 4 INT 9 10 10 0 1 NULL
+ t284 c 4 INT 9 10 10 0 1 NULL
+ t284 d 4 INT 9 10 10 0 1 NULL
+ t284 e 4 INT 9 10 10 0 1 NULL
+ t285 a 4 INT 9 10 10 0 1 NULL
+ t285 b 4 INT 9 10 10 0 1 NULL
+ t285 c 4 INT 9 10 10 0 1 NULL
+ t285 d 4 INT 9 10 10 0 1 NULL
+ t285 e 4 INT 9 10 10 0 1 NULL
+ t286 a 4 INT 9 10 10 0 1 NULL
+ t286 b 4 INT 9 10 10 0 1 NULL
+ t286 c 4 INT 9 10 10 0 1 NULL
+ t286 d 4 INT 9 10 10 0 1 NULL
+ t286 e 4 INT 9 10 10 0 1 NULL
+ t287 a 4 INT 9 10 10 0 1 NULL
+ t287 b 4 INT 9 10 10 0 1 NULL
+ t287 c 4 INT 9 10 10 0 1 NULL
+ t287 d 4 INT 9 10 10 0 1 NULL
+ t287 e 4 INT 9 10 10 0 1 NULL
+ t288 a 4 INT 9 10 10 0 1 NULL
+ t288 b 4 INT 9 10 10 0 1 NULL
+ t288 c 4 INT 9 10 10 0 1 NULL
+ t288 d 4 INT 9 10 10 0 1 NULL
+ t288 e 4 INT 9 10 10 0 1 NULL
+ t289 a 4 INT 9 10 10 0 1 NULL
+ t289 b 4 INT 9 10 10 0 1 NULL
+ t289 c 4 INT 9 10 10 0 1 NULL
+ t289 d 4 INT 9 10 10 0 1 NULL
+ t289 e 4 INT 9 10 10 0 1 NULL
+ t290 a 4 INT 9 10 10 0 1 NULL
+ t290 b 4 INT 9 10 10 0 1 NULL
+ t290 c 4 INT 9 10 10 0 1 NULL
+ t290 d 4 INT 9 10 10 0 1 NULL
+ t290 e 4 INT 9 10 10 0 1 NULL
+ t291 a 4 INT 9 10 10 0 1 NULL
+ t291 b 4 INT 9 10 10 0 1 NULL
+ t291 c 4 INT 9 10 10 0 1 NULL
+ t291 d 4 INT 9 10 10 0 1 NULL
+ t291 e 4 INT 9 10 10 0 1 NULL
+ t292 a 4 INT 9 10 10 0 1 NULL
+ t292 b 4 INT 9 10 10 0 1 NULL
+ t292 c 4 INT 9 10 10 0 1 NULL
+ t292 d 4 INT 9 10 10 0 1 NULL
+ t292 e 4 INT 9 10 10 0 1 NULL
+ t293 a 4 INT 9 10 10 0 1 NULL
+ t293 b 4 INT 9 10 10 0 1 NULL
+ t293 c 4 INT 9 10 10 0 1 NULL
+ t293 d 4 INT 9 10 10 0 1 NULL
+ t293 e 4 INT 9 10 10 0 1 NULL
+ t294 a 4 INT 9 10 10 0 1 NULL
+ t294 b 4 INT 9 10 10 0 1 NULL
+ t294 c 4 INT 9 10 10 0 1 NULL
+ t294 d 4 INT 9 10 10 0 1 NULL
+ t294 e 4 INT 9 10 10 0 1 NULL
+ t295 a 4 INT 9 10 10 0 1 NULL
+ t295 b 4 INT 9 10 10 0 1 NULL
+ t295 c 4 INT 9 10 10 0 1 NULL
+ t295 d 4 INT 9 10 10 0 1 NULL
+ t295 e 4 INT 9 10 10 0 1 NULL
+ t296 a 4 INT 9 10 10 0 1 NULL
+ t296 b 4 INT 9 10 10 0 1 NULL
+ t296 c 4 INT 9 10 10 0 1 NULL
+ t296 d 4 INT 9 10 10 0 1 NULL
+ t296 e 4 INT 9 10 10 0 1 NULL
+ t297 a 4 INT 9 10 10 0 1 NULL
+ t297 b 4 INT 9 10 10 0 1 NULL
+ t297 c 4 INT 9 10 10 0 1 NULL
+ t297 d 4 INT 9 10 10 0 1 NULL
+ t297 e 4 INT 9 10 10 0 1 NULL
+ t298 a 4 INT 9 10 10 0 1 NULL
+ t298 b 4 INT 9 10 10 0 1 NULL
+ t298 c 4 INT 9 10 10 0 1 NULL
+ t298 d 4 INT 9 10 10 0 1 NULL
+ t298 e 4 INT 9 10 10 0 1 NULL
+ t299 a 4 INT 9 10 10 0 1 NULL
+ t299 b 4 INT 9 10 10 0 1 NULL
+ t299 c 4 INT 9 10 10 0 1 NULL
+ t299 d 4 INT 9 10 10 0 1 NULL
+ t299 e 4 INT 9 10 10 0 1 NULL
+ t300 a 4 INT 9 10 10 0 1 NULL
+ t300 b 4 INT 9 10 10 0 1 NULL
+ t300 c 4 INT 9 10 10 0 1 NULL
+ t300 d 4 INT 9 10 10 0 1 NULL
+ t300 e 4 INT 9 10 10 0 1 NULL
+ t301 a 4 INT 9 10 10 0 1 NULL
+ t301 b 4 INT 9 10 10 0 1 NULL
+ t301 c 4 INT 9 10 10 0 1 NULL
+ t301 d 4 INT 9 10 10 0 1 NULL
+ t301 e 4 INT 9 10 10 0 1 NULL
+ t302 a 4 INT 9 10 10 0 1 NULL
+ t302 b 4 INT 9 10 10 0 1 NULL
+ t302 c 4 INT 9 10 10 0 1 NULL
+ t302 d 4 INT 9 10 10 0 1 NULL
+ t302 e 4 INT 9 10 10 0 1 NULL
+ t303 a 4 INT 9 10 10 0 1 NULL
+ t303 b 4 INT 9 10 10 0 1 NULL
+ t303 c 4 INT 9 10 10 0 1 NULL
+ t303 d 4 INT 9 10 10 0 1 NULL
+ t303 e 4 INT 9 10 10 0 1 NULL
+ t304 a 4 INT 9 10 10 0 1 NULL
+ t304 b 4 INT 9 10 10 0 1 NULL
+ t304 c 4 INT 9 10 10 0 1 NULL
+ t304 d 4 INT 9 10 10 0 1 NULL
+ t304 e 4 INT 9 10 10 0 1 NULL
+ t305 a 4 INT 9 10 10 0 1 NULL
+ t305 b 4 INT 9 10 10 0 1 NULL
+ t305 c 4 INT 9 10 10 0 1 NULL
+ t305 d 4 INT 9 10 10 0 1 NULL
+ t305 e 4 INT 9 10 10 0 1 NULL
+ t306 a 4 INT 9 10 10 0 1 NULL
+ t306 b 4 INT 9 10 10 0 1 NULL
+ t306 c 4 INT 9 10 10 0 1 NULL
+ t306 d 4 INT 9 10 10 0 1 NULL
+ t306 e 4 INT 9 10 10 0 1 NULL
+ t307 a 4 INT 9 10 10 0 1 NULL
+ t307 b 4 INT 9 10 10 0 1 NULL
+ t307 c 4 INT 9 10 10 0 1 NULL
+ t307 d 4 INT 9 10 10 0 1 NULL
+ t307 e 4 INT 9 10 10 0 1 NULL
+ t308 a 4 INT 9 10 10 0 1 NULL
+ t308 b 4 INT 9 10 10 0 1 NULL
+ t308 c 4 INT 9 10 10 0 1 NULL
+ t308 d 4 INT 9 10 10 0 1 NULL
+ t308 e 4 INT 9 10 10 0 1 NULL
+ t309 a 4 INT 9 10 10 0 1 NULL
+ t309 b 4 INT 9 10 10 0 1 NULL
+ t309 c 4 INT 9 10 10 0 1 NULL
+ t309 d 4 INT 9 10 10 0 1 NULL
+ t309 e 4 INT 9 10 10 0 1 NULL
+ t310 a 4 INT 9 10 10 0 1 NULL
+ t310 b 4 INT 9 10 10 0 1 NULL
+ t310 c 4 INT 9 10 10 0 1 NULL
+ t310 d 4 INT 9 10 10 0 1 NULL
+ t310 e 4 INT 9 10 10 0 1 NULL
+ t311 a 4 INT 9 10 10 0 1 NULL
+ t311 b 4 INT 9 10 10 0 1 NULL
+ t311 c 4 INT 9 10 10 0 1 NULL
+ t311 d 4 INT 9 10 10 0 1 NULL
+ t311 e 4 INT 9 10 10 0 1 NULL
+ t312 a 4 INT 9 10 10 0 1 NULL
+ t312 b 4 INT 9 10 10 0 1 NULL
+ t312 c 4 INT 9 10 10 0 1 NULL
+ t312 d 4 INT 9 10 10 0 1 NULL
+ t312 e 4 INT 9 10 10 0 1 NULL
+ t313 a 4 INT 9 10 10 0 1 NULL
+ t313 b 4 INT 9 10 10 0 1 NULL
+ t313 c 4 INT 9 10 10 0 1 NULL
+ t313 d 4 INT 9 10 10 0 1 NULL
+ t313 e 4 INT 9 10 10 0 1 NULL
+ t314 a 4 INT 9 10 10 0 1 NULL
+ t314 b 4 INT 9 10 10 0 1 NULL
+ t314 c 4 INT 9 10 10 0 1 NULL
+ t314 d 4 INT 9 10 10 0 1 NULL
+ t314 e 4 INT 9 10 10 0 1 NULL
+ t315 a 4 INT 9 10 10 0 1 NULL
+ t315 b 4 INT 9 10 10 0 1 NULL
+ t315 c 4 INT 9 10 10 0 1 NULL
+ t315 d 4 INT 9 10 10 0 1 NULL
+ t315 e 4 INT 9 10 10 0 1 NULL
+ t316 a 4 INT 9 10 10 0 1 NULL
+ t316 b 4 INT 9 10 10 0 1 NULL
+ t316 c 4 INT 9 10 10 0 1 NULL
+ t316 d 4 INT 9 10 10 0 1 NULL
+ t316 e 4 INT 9 10 10 0 1 NULL
+ t317 a 4 INT 9 10 10 0 1 NULL
+ t317 b 4 INT 9 10 10 0 1 NULL
+ t317 c 4 INT 9 10 10 0 1 NULL
+ t317 d 4 INT 9 10 10 0 1 NULL
+ t317 e 4 INT 9 10 10 0 1 NULL
+ t318 a 4 INT 9 10 10 0 1 NULL
+ t318 b 4 INT 9 10 10 0 1 NULL
+ t318 c 4 INT 9 10 10 0 1 NULL
+ t318 d 4 INT 9 10 10 0 1 NULL
+ t318 e 4 INT 9 10 10 0 1 NULL
+ t319 a 4 INT 9 10 10 0 1 NULL
+ t319 b 4 INT 9 10 10 0 1 NULL
+ t319 c 4 INT 9 10 10 0 1 NULL
+ t319 d 4 INT 9 10 10 0 1 NULL
+ t319 e 4 INT 9 10 10 0 1 NULL
+ t320 a 4 INT 9 10 10 0 1 NULL
+ t320 b 4 INT 9 10 10 0 1 NULL
+ t320 c 4 INT 9 10 10 0 1 NULL
+ t320 d 4 INT 9 10 10 0 1 NULL
+ t320 e 4 INT 9 10 10 0 1 NULL
+ t321 a 4 INT 9 10 10 0 1 NULL
+ t321 b 4 INT 9 10 10 0 1 NULL
+ t321 c 4 INT 9 10 10 0 1 NULL
+ t321 d 4 INT 9 10 10 0 1 NULL
+ t321 e 4 INT 9 10 10 0 1 NULL
+ t322 a 4 INT 9 10 10 0 1 NULL
+ t322 b 4 INT 9 10 10 0 1 NULL
+ t322 c 4 INT 9 10 10 0 1 NULL
+ t322 d 4 INT 9 10 10 0 1 NULL
+ t322 e 4 INT 9 10 10 0 1 NULL
+ t323 a 4 INT 9 10 10 0 1 NULL
+ t323 b 4 INT 9 10 10 0 1 NULL
+ t323 c 4 INT 9 10 10 0 1 NULL
+ t323 d 4 INT 9 10 10 0 1 NULL
+ t323 e 4 INT 9 10 10 0 1 NULL
+ t324 a 4 INT 9 10 10 0 1 NULL
+ t324 b 4 INT 9 10 10 0 1 NULL
+ t324 c 4 INT 9 10 10 0 1 NULL
+ t324 d 4 INT 9 10 10 0 1 NULL
+ t324 e 4 INT 9 10 10 0 1 NULL
+ t325 a 4 INT 9 10 10 0 1 NULL
+ t325 b 4 INT 9 10 10 0 1 NULL
+ t325 c 4 INT 9 10 10 0 1 NULL
+ t325 d 4 INT 9 10 10 0 1 NULL
+ t325 e 4 INT 9 10 10 0 1 NULL
+ t326 a 4 INT 9 10 10 0 1 NULL
+ t326 b 4 INT 9 10 10 0 1 NULL
+ t326 c 4 INT 9 10 10 0 1 NULL
+ t326 d 4 INT 9 10 10 0 1 NULL
+ t326 e 4 INT 9 10 10 0 1 NULL
+ t327 a 4 INT 9 10 10 0 1 NULL
+ t327 b 4 INT 9 10 10 0 1 NULL
+ t327 c 4 INT 9 10 10 0 1 NULL
+ t327 d 4 INT 9 10 10 0 1 NULL
+ t327 e 4 INT 9 10 10 0 1 NULL
+ t328 a 4 INT 9 10 10 0 1 NULL
+ t328 b 4 INT 9 10 10 0 1 NULL
+ t328 c 4 INT 9 10 10 0 1 NULL
+ t328 d 4 INT 9 10 10 0 1 NULL
+ t328 e 4 INT 9 10 10 0 1 NULL
+ t329 a 4 INT 9 10 10 0 1 NULL
+ t329 b 4 INT 9 10 10 0 1 NULL
+ t329 c 4 INT 9 10 10 0 1 NULL
+ t329 d 4 INT 9 10 10 0 1 NULL
+ t329 e 4 INT 9 10 10 0 1 NULL
+ t330 a 4 INT 9 10 10 0 1 NULL
+ t330 b 4 INT 9 10 10 0 1 NULL
+ t330 c 4 INT 9 10 10 0 1 NULL
+ t330 d 4 INT 9 10 10 0 1 NULL
+ t330 e 4 INT 9 10 10 0 1 NULL
+ t331 a 4 INT 9 10 10 0 1 NULL
+ t331 b 4 INT 9 10 10 0 1 NULL
+ t331 c 4 INT 9 10 10 0 1 NULL
+ t331 d 4 INT 9 10 10 0 1 NULL
+ t331 e 4 INT 9 10 10 0 1 NULL
+ t332 a 4 INT 9 10 10 0 1 NULL
+ t332 b 4 INT 9 10 10 0 1 NULL
+ t332 c 4 INT 9 10 10 0 1 NULL
+ t332 d 4 INT 9 10 10 0 1 NULL
+ t332 e 4 INT 9 10 10 0 1 NULL
+ t333 a 4 INT 9 10 10 0 1 NULL
+ t333 b 4 INT 9 10 10 0 1 NULL
+ t333 c 4 INT 9 10 10 0 1 NULL
+ t333 d 4 INT 9 10 10 0 1 NULL
+ t333 e 4 INT 9 10 10 0 1 NULL
+ t334 a 4 INT 9 10 10 0 1 NULL
+ t334 b 4 INT 9 10 10 0 1 NULL
+ t334 c 4 INT 9 10 10 0 1 NULL
+ t334 d 4 INT 9 10 10 0 1 NULL
+ t334 e 4 INT 9 10 10 0 1 NULL
+ t335 a 4 INT 9 10 10 0 1 NULL
+ t335 b 4 INT 9 10 10 0 1 NULL
+ t335 c 4 INT 9 10 10 0 1 NULL
+ t335 d 4 INT 9 10 10 0 1 NULL
+ t335 e 4 INT 9 10 10 0 1 NULL
+ t336 a 4 INT 9 10 10 0 1 NULL
+ t336 b 4 INT 9 10 10 0 1 NULL
+ t336 c 4 INT 9 10 10 0 1 NULL
+ t336 d 4 INT 9 10 10 0 1 NULL
+ t336 e 4 INT 9 10 10 0 1 NULL
+ t337 a 4 INT 9 10 10 0 1 NULL
+ t337 b 4 INT 9 10 10 0 1 NULL
+ t337 c 4 INT 9 10 10 0 1 NULL
+ t337 d 4 INT 9 10 10 0 1 NULL
+ t337 e 4 INT 9 10 10 0 1 NULL
+ t338 a 4 INT 9 10 10 0 1 NULL
+ t338 b 4 INT 9 10 10 0 1 NULL
+ t338 c 4 INT 9 10 10 0 1 NULL
+ t338 d 4 INT 9 10 10 0 1 NULL
+ t338 e 4 INT 9 10 10 0 1 NULL
+ t339 a 4 INT 9 10 10 0 1 NULL
+ t339 b 4 INT 9 10 10 0 1 NULL
+ t339 c 4 INT 9 10 10 0 1 NULL
+ t339 d 4 INT 9 10 10 0 1 NULL
+ t339 e 4 INT 9 10 10 0 1 NULL
+ t340 a 4 INT 9 10 10 0 1 NULL
+ t340 b 4 INT 9 10 10 0 1 NULL
+ t340 c 4 INT 9 10 10 0 1 NULL
+ t340 d 4 INT 9 10 10 0 1 NULL
+ t340 e 4 INT 9 10 10 0 1 NULL
+ t341 a 4 INT 9 10 10 0 1 NULL
+ t341 b 4 INT 9 10 10 0 1 NULL
+ t341 c 4 INT 9 10 10 0 1 NULL
+ t341 d 4 INT 9 10 10 0 1 NULL
+ t341 e 4 INT 9 10 10 0 1 NULL
+ t342 a 4 INT 9 10 10 0 1 NULL
+ t342 b 4 INT 9 10 10 0 1 NULL
+ t342 c 4 INT 9 10 10 0 1 NULL
+ t342 d 4 INT 9 10 10 0 1 NULL
+ t342 e 4 INT 9 10 10 0 1 NULL
+ t343 a 4 INT 9 10 10 0 1 NULL
+ t343 b 4 INT 9 10 10 0 1 NULL
+ t343 c 4 INT 9 10 10 0 1 NULL
+ t343 d 4 INT 9 10 10 0 1 NULL
+ t343 e 4 INT 9 10 10 0 1 NULL
+ t344 a 4 INT 9 10 10 0 1 NULL
+ t344 b 4 INT 9 10 10 0 1 NULL
+ t344 c 4 INT 9 10 10 0 1 NULL
+ t344 d 4 INT 9 10 10 0 1 NULL
+ t344 e 4 INT 9 10 10 0 1 NULL
+ t345 a 4 INT 9 10 10 0 1 NULL
+ t345 b 4 INT 9 10 10 0 1 NULL
+ t345 c 4 INT 9 10 10 0 1 NULL
+ t345 d 4 INT 9 10 10 0 1 NULL
+ t345 e 4 INT 9 10 10 0 1 NULL
+ t346 a 4 INT 9 10 10 0 1 NULL
+ t346 b 4 INT 9 10 10 0 1 NULL
+ t346 c 4 INT 9 10 10 0 1 NULL
+ t346 d 4 INT 9 10 10 0 1 NULL
+ t346 e 4 INT 9 10 10 0 1 NULL
+ t347 a 4 INT 9 10 10 0 1 NULL
+ t347 b 4 INT 9 10 10 0 1 NULL
+ t347 c 4 INT 9 10 10 0 1 NULL
+ t347 d 4 INT 9 10 10 0 1 NULL
+ t347 e 4 INT 9 10 10 0 1 NULL
+ t348 a 4 INT 9 10 10 0 1 NULL
+ t348 b 4 INT 9 10 10 0 1 NULL
+ t348 c 4 INT 9 10 10 0 1 NULL
+ t348 d 4 INT 9 10 10 0 1 NULL
+ t348 e 4 INT 9 10 10 0 1 NULL
+ t349 a 4 INT 9 10 10 0 1 NULL
+ t349 b 4 INT 9 10 10 0 1 NULL
+ t349 c 4 INT 9 10 10 0 1 NULL
+ t349 d 4 INT 9 10 10 0 1 NULL
+ t349 e 4 INT 9 10 10 0 1 NULL
+ t350 a 4 INT 9 10 10 0 1 NULL
+ t350 b 4 INT 9 10 10 0 1 NULL
+ t350 c 4 INT 9 10 10 0 1 NULL
+ t350 d 4 INT 9 10 10 0 1 NULL
+ t350 e 4 INT 9 10 10 0 1 NULL
+ t351 a 4 INT 9 10 10 0 1 NULL
+ t351 b 4 INT 9 10 10 0 1 NULL
+ t351 c 4 INT 9 10 10 0 1 NULL
+ t351 d 4 INT 9 10 10 0 1 NULL
+ t351 e 4 INT 9 10 10 0 1 NULL
+ t352 a 4 INT 9 10 10 0 1 NULL
+ t352 b 4 INT 9 10 10 0 1 NULL
+ t352 c 4 INT 9 10 10 0 1 NULL
+ t352 d 4 INT 9 10 10 0 1 NULL
+ t352 e 4 INT 9 10 10 0 1 NULL
+ t353 a 4 INT 9 10 10 0 1 NULL
+ t353 b 4 INT 9 10 10 0 1 NULL
+ t353 c 4 INT 9 10 10 0 1 NULL
+ t353 d 4 INT 9 10 10 0 1 NULL
+ t353 e 4 INT 9 10 10 0 1 NULL
+ t354 a 4 INT 9 10 10 0 1 NULL
+ t354 b 4 INT 9 10 10 0 1 NULL
+ t354 c 4 INT 9 10 10 0 1 NULL
+ t354 d 4 INT 9 10 10 0 1 NULL
+ t354 e 4 INT 9 10 10 0 1 NULL
+ t355 a 4 INT 9 10 10 0 1 NULL
+ t355 b 4 INT 9 10 10 0 1 NULL
+ t355 c 4 INT 9 10 10 0 1 NULL
+ t355 d 4 INT 9 10 10 0 1 NULL
+ t355 e 4 INT 9 10 10 0 1 NULL
+ t356 a 4 INT 9 10 10 0 1 NULL
+ t356 b 4 INT 9 10 10 0 1 NULL
+ t356 c 4 INT 9 10 10 0 1 NULL
+ t356 d 4 INT 9 10 10 0 1 NULL
+ t356 e 4 INT 9 10 10 0 1 NULL
+ t357 a 4 INT 9 10 10 0 1 NULL
+ t357 b 4 INT 9 10 10 0 1 NULL
+ t357 c 4 INT 9 10 10 0 1 NULL
+ t357 d 4 INT 9 10 10 0 1 NULL
+ t357 e 4 INT 9 10 10 0 1 NULL
+ t358 a 4 INT 9 10 10 0 1 NULL
+ t358 b 4 INT 9 10 10 0 1 NULL
+ t358 c 4 INT 9 10 10 0 1 NULL
+ t358 d 4 INT 9 10 10 0 1 NULL
+ t358 e 4 INT 9 10 10 0 1 NULL
+ t359 a 4 INT 9 10 10 0 1 NULL
+ t359 b 4 INT 9 10 10 0 1 NULL
+ t359 c 4 INT 9 10 10 0 1 NULL
+ t359 d 4 INT 9 10 10 0 1 NULL
+ t359 e 4 INT 9 10 10 0 1 NULL
+ t360 a 4 INT 9 10 10 0 1 NULL
+ t360 b 4 INT 9 10 10 0 1 NULL
+ t360 c 4 INT 9 10 10 0 1 NULL
+ t360 d 4 INT 9 10 10 0 1 NULL
+ t360 e 4 INT 9 10 10 0 1 NULL
+ t361 a 4 INT 9 10 10 0 1 NULL
+ t361 b 4 INT 9 10 10 0 1 NULL
+ t361 c 4 INT 9 10 10 0 1 NULL
+ t361 d 4 INT 9 10 10 0 1 NULL
+ t361 e 4 INT 9 10 10 0 1 NULL
+ t362 a 4 INT 9 10 10 0 1 NULL
+ t362 b 4 INT 9 10 10 0 1 NULL
+ t362 c 4 INT 9 10 10 0 1 NULL
+ t362 d 4 INT 9 10 10 0 1 NULL
+ t362 e 4 INT 9 10 10 0 1 NULL
+ t363 a 4 INT 9 10 10 0 1 NULL
+ t363 b 4 INT 9 10 10 0 1 NULL
+ t363 c 4 INT 9 10 10 0 1 NULL
+ t363 d 4 INT 9 10 10 0 1 NULL
+ t363 e 4 INT 9 10 10 0 1 NULL
+ t364 a 4 INT 9 10 10 0 1 NULL
+ t364 b 4 INT 9 10 10 0 1 NULL
+ t364 c 4 INT 9 10 10 0 1 NULL
+ t364 d 4 INT 9 10 10 0 1 NULL
+ t364 e 4 INT 9 10 10 0 1 NULL
+ t365 a 4 INT 9 10 10 0 1 NULL
+ t365 b 4 INT 9 10 10 0 1 NULL
+ t365 c 4 INT 9 10 10 0 1 NULL
+ t365 d 4 INT 9 10 10 0 1 NULL
+ t365 e 4 INT 9 10 10 0 1 NULL
+ t366 a 4 INT 9 10 10 0 1 NULL
+ t366 b 4 INT 9 10 10 0 1 NULL
+ t366 c 4 INT 9 10 10 0 1 NULL
+ t366 d 4 INT 9 10 10 0 1 NULL
+ t366 e 4 INT 9 10 10 0 1 NULL
+ t367 a 4 INT 9 10 10 0 1 NULL
+ t367 b 4 INT 9 10 10 0 1 NULL
+ t367 c 4 INT 9 10 10 0 1 NULL
+ t367 d 4 INT 9 10 10 0 1 NULL
+ t367 e 4 INT 9 10 10 0 1 NULL
+ t368 a 4 INT 9 10 10 0 1 NULL
+ t368 b 4 INT 9 10 10 0 1 NULL
+ t368 c 4 INT 9 10 10 0 1 NULL
+ t368 d 4 INT 9 10 10 0 1 NULL
+ t368 e 4 INT 9 10 10 0 1 NULL
+ t369 a 4 INT 9 10 10 0 1 NULL
+ t369 b 4 INT 9 10 10 0 1 NULL
+ t369 c 4 INT 9 10 10 0 1 NULL
+ t369 d 4 INT 9 10 10 0 1 NULL
+ t369 e 4 INT 9 10 10 0 1 NULL
+ t370 a 4 INT 9 10 10 0 1 NULL
+ t370 b 4 INT 9 10 10 0 1 NULL
+ t370 c 4 INT 9 10 10 0 1 NULL
+ t370 d 4 INT 9 10 10 0 1 NULL
+ t370 e 4 INT 9 10 10 0 1 NULL
+ t371 a 4 INT 9 10 10 0 1 NULL
+ t371 b 4 INT 9 10 10 0 1 NULL
+ t371 c 4 INT 9 10 10 0 1 NULL
+ t371 d 4 INT 9 10 10 0 1 NULL
+ t371 e 4 INT 9 10 10 0 1 NULL
+ t372 a 4 INT 9 10 10 0 1 NULL
+ t372 b 4 INT 9 10 10 0 1 NULL
+ t372 c 4 INT 9 10 10 0 1 NULL
+ t372 d 4 INT 9 10 10 0 1 NULL
+ t372 e 4 INT 9 10 10 0 1 NULL
+ t373 a 4 INT 9 10 10 0 1 NULL
+ t373 b 4 INT 9 10 10 0 1 NULL
+ t373 c 4 INT 9 10 10 0 1 NULL
+ t373 d 4 INT 9 10 10 0 1 NULL
+ t373 e 4 INT 9 10 10 0 1 NULL
+ t374 a 4 INT 9 10 10 0 1 NULL
+ t374 b 4 INT 9 10 10 0 1 NULL
+ t374 c 4 INT 9 10 10 0 1 NULL
+ t374 d 4 INT 9 10 10 0 1 NULL
+ t374 e 4 INT 9 10 10 0 1 NULL
+ t375 a 4 INT 9 10 10 0 1 NULL
+ t375 b 4 INT 9 10 10 0 1 NULL
+ t375 c 4 INT 9 10 10 0 1 NULL
+ t375 d 4 INT 9 10 10 0 1 NULL
+ t375 e 4 INT 9 10 10 0 1 NULL
+ t376 a 4 INT 9 10 10 0 1 NULL
+ t376 b 4 INT 9 10 10 0 1 NULL
+ t376 c 4 INT 9 10 10 0 1 NULL
+ t376 d 4 INT 9 10 10 0 1 NULL
+ t376 e 4 INT 9 10 10 0 1 NULL
+ t377 a 4 INT 9 10 10 0 1 NULL
+ t377 b 4 INT 9 10 10 0 1 NULL
+ t377 c 4 INT 9 10 10 0 1 NULL
+ t377 d 4 INT 9 10 10 0 1 NULL
+ t377 e 4 INT 9 10 10 0 1 NULL
+ t378 a 4 INT 9 10 10 0 1 NULL
+ t378 b 4 INT 9 10 10 0 1 NULL
+ t378 c 4 INT 9 10 10 0 1 NULL
+ t378 d 4 INT 9 10 10 0 1 NULL
+ t378 e 4 INT 9 10 10 0 1 NULL
+ t379 a 4 INT 9 10 10 0 1 NULL
+ t379 b 4 INT 9 10 10 0 1 NULL
+ t379 c 4 INT 9 10 10 0 1 NULL
+ t379 d 4 INT 9 10 10 0 1 NULL
+ t379 e 4 INT 9 10 10 0 1 NULL
+ t380 a 4 INT 9 10 10 0 1 NULL
+ t380 b 4 INT 9 10 10 0 1 NULL
+ t380 c 4 INT 9 10 10 0 1 NULL
+ t380 d 4 INT 9 10 10 0 1 NULL
+ t380 e 4 INT 9 10 10 0 1 NULL
+ t381 a 4 INT 9 10 10 0 1 NULL
+ t381 b 4 INT 9 10 10 0 1 NULL
+ t381 c 4 INT 9 10 10 0 1 NULL
+ t381 d 4 INT 9 10 10 0 1 NULL
+ t381 e 4 INT 9 10 10 0 1 NULL
+ t382 a 4 INT 9 10 10 0 1 NULL
+ t382 b 4 INT 9 10 10 0 1 NULL
+ t382 c 4 INT 9 10 10 0 1 NULL
+ t382 d 4 INT 9 10 10 0 1 NULL
+ t382 e 4 INT 9 10 10 0 1 NULL
+ t383 a 4 INT 9 10 10 0 1 NULL
+ t383 b 4 INT 9 10 10 0 1 NULL
+ t383 c 4 INT 9 10 10 0 1 NULL
+ t383 d 4 INT 9 10 10 0 1 NULL
+ t383 e 4 INT 9 10 10 0 1 NULL
+ t384 a 4 INT 9 10 10 0 1 NULL
+ t384 b 4 INT 9 10 10 0 1 NULL
+ t384 c 4 INT 9 10 10 0 1 NULL
+ t384 d 4 INT 9 10 10 0 1 NULL
+ t384 e 4 INT 9 10 10 0 1 NULL
+ t385 a 4 INT 9 10 10 0 1 NULL
+ t385 b 4 INT 9 10 10 0 1 NULL
+ t385 c 4 INT 9 10 10 0 1 NULL
+ t385 d 4 INT 9 10 10 0 1 NULL
+ t385 e 4 INT 9 10 10 0 1 NULL
+ t386 a 4 INT 9 10 10 0 1 NULL
+ t386 b 4 INT 9 10 10 0 1 NULL
+ t386 c 4 INT 9 10 10 0 1 NULL
+ t386 d 4 INT 9 10 10 0 1 NULL
+ t386 e 4 INT 9 10 10 0 1 NULL
+ t387 a 4 INT 9 10 10 0 1 NULL
+ t387 b 4 INT 9 10 10 0 1 NULL
+ t387 c 4 INT 9 10 10 0 1 NULL
+ t387 d 4 INT 9 10 10 0 1 NULL
+ t387 e 4 INT 9 10 10 0 1 NULL
+ t388 a 4 INT 9 10 10 0 1 NULL
+ t388 b 4 INT 9 10 10 0 1 NULL
+ t388 c 4 INT 9 10 10 0 1 NULL
+ t388 d 4 INT 9 10 10 0 1 NULL
+ t388 e 4 INT 9 10 10 0 1 NULL
+ t389 a 4 INT 9 10 10 0 1 NULL
+ t389 b 4 INT 9 10 10 0 1 NULL
+ t389 c 4 INT 9 10 10 0 1 NULL
+ t389 d 4 INT 9 10 10 0 1 NULL
+ t389 e 4 INT 9 10 10 0 1 NULL
+ t390 a 4 INT 9 10 10 0 1 NULL
+ t390 b 4 INT 9 10 10 0 1 NULL
+ t390 c 4 INT 9 10 10 0 1 NULL
+ t390 d 4 INT 9 10 10 0 1 NULL
+ t390 e 4 INT 9 10 10 0 1 NULL
+ t391 a 4 INT 9 10 10 0 1 NULL
+ t391 b 4 INT 9 10 10 0 1 NULL
+ t391 c 4 INT 9 10 10 0 1 NULL
+ t391 d 4 INT 9 10 10 0 1 NULL
+ t391 e 4 INT 9 10 10 0 1 NULL
+ t392 a 4 INT 9 10 10 0 1 NULL
+ t392 b 4 INT 9 10 10 0 1 NULL
+ t392 c 4 INT 9 10 10 0 1 NULL
+ t392 d 4 INT 9 10 10 0 1 NULL
+ t392 e 4 INT 9 10 10 0 1 NULL
+ t393 a 4 INT 9 10 10 0 1 NULL
+ t393 b 4 INT 9 10 10 0 1 NULL
+ t393 c 4 INT 9 10 10 0 1 NULL
+ t393 d 4 INT 9 10 10 0 1 NULL
+ t393 e 4 INT 9 10 10 0 1 NULL
+ t394 a 4 INT 9 10 10 0 1 NULL
+ t394 b 4 INT 9 10 10 0 1 NULL
+ t394 c 4 INT 9 10 10 0 1 NULL
+ t394 d 4 INT 9 10 10 0 1 NULL
+ t394 e 4 INT 9 10 10 0 1 NULL
+ t395 a 4 INT 9 10 10 0 1 NULL
+ t395 b 4 INT 9 10 10 0 1 NULL
+ t395 c 4 INT 9 10 10 0 1 NULL
+ t395 d 4 INT 9 10 10 0 1 NULL
+ t395 e 4 INT 9 10 10 0 1 NULL
+ t396 a 4 INT 9 10 10 0 1 NULL
+ t396 b 4 INT 9 10 10 0 1 NULL
+ t396 c 4 INT 9 10 10 0 1 NULL
+ t396 d 4 INT 9 10 10 0 1 NULL
+ t396 e 4 INT 9 10 10 0 1 NULL
+ t397 a 4 INT 9 10 10 0 1 NULL
+ t397 b 4 INT 9 10 10 0 1 NULL
+ t397 c 4 INT 9 10 10 0 1 NULL
+ t397 d 4 INT 9 10 10 0 1 NULL
+ t397 e 4 INT 9 10 10 0 1 NULL
+ t398 a 4 INT 9 10 10 0 1 NULL
+ t398 b 4 INT 9 10 10 0 1 NULL
+ t398 c 4 INT 9 10 10 0 1 NULL
+ t398 d 4 INT 9 10 10 0 1 NULL
+ t398 e 4 INT 9 10 10 0 1 NULL
+ t399 a 4 INT 9 10 10 0 1 NULL
+ t399 b 4 INT 9 10 10 0 1 NULL
+ t399 c 4 INT 9 10 10 0 1 NULL
+ t399 d 4 INT 9 10 10 0 1 NULL
+ t399 e 4 INT 9 10 10 0 1 NULL
DROP TABLE t1;
CREATE TABLE t1 ENGINE=CONNECT CATFUNC=Tables TABLE_TYPE=ODBC CONNECTION='Driver=SQLite3 ODBC Driver;Database=MTR_SUITE_DIR/std_data/test.sqlite3;NoWCHAR=yes' CHARSET=utf8 DATA_CHARSET=utf8;
SELECT * FROM t1 ORDER BY Table_name;
Table_Cat Table_Schema Table_Name Table_Type Remark
- t000 TABLE
- t001 TABLE
- t002 TABLE
- t003 TABLE
- t004 TABLE
- t005 TABLE
- t006 TABLE
- t007 TABLE
- t008 TABLE
- t009 TABLE
- t010 TABLE
- t011 TABLE
- t012 TABLE
- t013 TABLE
- t014 TABLE
- t015 TABLE
- t016 TABLE
- t017 TABLE
- t018 TABLE
- t019 TABLE
- t020 TABLE
- t021 TABLE
- t022 TABLE
- t023 TABLE
- t024 TABLE
- t025 TABLE
- t026 TABLE
- t027 TABLE
- t028 TABLE
- t029 TABLE
- t030 TABLE
- t031 TABLE
- t032 TABLE
- t033 TABLE
- t034 TABLE
- t035 TABLE
- t036 TABLE
- t037 TABLE
- t038 TABLE
- t039 TABLE
- t040 TABLE
- t041 TABLE
- t042 TABLE
- t043 TABLE
- t044 TABLE
- t045 TABLE
- t046 TABLE
- t047 TABLE
- t048 TABLE
- t049 TABLE
- t050 TABLE
- t051 TABLE
- t052 TABLE
- t053 TABLE
- t054 TABLE
- t055 TABLE
- t056 TABLE
- t057 TABLE
- t058 TABLE
- t059 TABLE
- t060 TABLE
- t061 TABLE
- t062 TABLE
- t063 TABLE
- t064 TABLE
- t065 TABLE
- t066 TABLE
- t067 TABLE
- t068 TABLE
- t069 TABLE
- t070 TABLE
- t071 TABLE
- t072 TABLE
- t073 TABLE
- t074 TABLE
- t075 TABLE
- t076 TABLE
- t077 TABLE
- t078 TABLE
- t079 TABLE
- t080 TABLE
- t081 TABLE
- t082 TABLE
- t083 TABLE
- t084 TABLE
- t085 TABLE
- t086 TABLE
- t087 TABLE
- t088 TABLE
- t089 TABLE
- t090 TABLE
- t091 TABLE
- t092 TABLE
- t093 TABLE
- t094 TABLE
- t095 TABLE
- t096 TABLE
- t097 TABLE
- t098 TABLE
- t099 TABLE
- t1 TABLE
- t100 TABLE
- t101 TABLE
- t102 TABLE
- t103 TABLE
- t104 TABLE
- t105 TABLE
- t106 TABLE
- t107 TABLE
- t108 TABLE
- t109 TABLE
- t110 TABLE
- t111 TABLE
- t112 TABLE
- t113 TABLE
- t114 TABLE
- t115 TABLE
- t116 TABLE
- t117 TABLE
- t118 TABLE
- t119 TABLE
- t120 TABLE
- t121 TABLE
- t122 TABLE
- t123 TABLE
- t124 TABLE
- t125 TABLE
- t126 TABLE
- t127 TABLE
- t128 TABLE
- t129 TABLE
- t130 TABLE
- t131 TABLE
- t132 TABLE
- t133 TABLE
- t134 TABLE
- t135 TABLE
- t136 TABLE
- t137 TABLE
- t138 TABLE
- t139 TABLE
- t140 TABLE
- t141 TABLE
- t142 TABLE
- t143 TABLE
- t144 TABLE
- t145 TABLE
- t146 TABLE
- t147 TABLE
- t148 TABLE
- t149 TABLE
- t150 TABLE
- t151 TABLE
- t152 TABLE
- t153 TABLE
- t154 TABLE
- t155 TABLE
- t156 TABLE
- t157 TABLE
- t158 TABLE
- t159 TABLE
- t160 TABLE
- t161 TABLE
- t162 TABLE
- t163 TABLE
- t164 TABLE
- t165 TABLE
- t166 TABLE
- t167 TABLE
- t168 TABLE
- t169 TABLE
- t170 TABLE
- t171 TABLE
- t172 TABLE
- t173 TABLE
- t174 TABLE
- t175 TABLE
- t176 TABLE
- t177 TABLE
- t178 TABLE
- t179 TABLE
- t180 TABLE
- t181 TABLE
- t182 TABLE
- t183 TABLE
- t184 TABLE
- t185 TABLE
- t186 TABLE
- t187 TABLE
- t188 TABLE
- t189 TABLE
- t190 TABLE
- t191 TABLE
- t192 TABLE
- t193 TABLE
- t194 TABLE
- t195 TABLE
- t196 TABLE
- t197 TABLE
- t198 TABLE
- t199 TABLE
- t200 TABLE
- t201 TABLE
- t202 TABLE
- t203 TABLE
- t204 TABLE
- t205 TABLE
- t206 TABLE
- t207 TABLE
- t208 TABLE
- t209 TABLE
- t210 TABLE
- t211 TABLE
- t212 TABLE
- t213 TABLE
- t214 TABLE
- t215 TABLE
- t216 TABLE
- t217 TABLE
- t218 TABLE
- t219 TABLE
- t220 TABLE
- t221 TABLE
- t222 TABLE
- t223 TABLE
- t224 TABLE
- t225 TABLE
- t226 TABLE
- t227 TABLE
- t228 TABLE
- t229 TABLE
- t230 TABLE
- t231 TABLE
- t232 TABLE
- t233 TABLE
- t234 TABLE
- t235 TABLE
- t236 TABLE
- t237 TABLE
- t238 TABLE
- t239 TABLE
- t240 TABLE
- t241 TABLE
- t242 TABLE
- t243 TABLE
- t244 TABLE
- t245 TABLE
- t246 TABLE
- t247 TABLE
- t248 TABLE
- t249 TABLE
- t250 TABLE
- t251 TABLE
- t252 TABLE
- t253 TABLE
- t254 TABLE
- t255 TABLE
- t256 TABLE
- t257 TABLE
- t258 TABLE
- t259 TABLE
- t260 TABLE
- t261 TABLE
- t262 TABLE
- t263 TABLE
- t264 TABLE
- t265 TABLE
- t266 TABLE
- t267 TABLE
- t268 TABLE
- t269 TABLE
- t270 TABLE
- t271 TABLE
- t272 TABLE
- t273 TABLE
- t274 TABLE
- t275 TABLE
- t276 TABLE
- t277 TABLE
- t278 TABLE
- t279 TABLE
- t280 TABLE
- t281 TABLE
- t282 TABLE
- t283 TABLE
- t284 TABLE
- t285 TABLE
- t286 TABLE
- t287 TABLE
- t288 TABLE
- t289 TABLE
- t290 TABLE
- t291 TABLE
- t292 TABLE
- t293 TABLE
- t294 TABLE
- t295 TABLE
- t296 TABLE
- t297 TABLE
- t298 TABLE
- t299 TABLE
- t300 TABLE
- t301 TABLE
- t302 TABLE
- t303 TABLE
- t304 TABLE
- t305 TABLE
- t306 TABLE
- t307 TABLE
- t308 TABLE
- t309 TABLE
- t310 TABLE
- t311 TABLE
- t312 TABLE
- t313 TABLE
- t314 TABLE
- t315 TABLE
- t316 TABLE
- t317 TABLE
- t318 TABLE
- t319 TABLE
- t320 TABLE
- t321 TABLE
- t322 TABLE
- t323 TABLE
- t324 TABLE
- t325 TABLE
- t326 TABLE
- t327 TABLE
- t328 TABLE
- t329 TABLE
- t330 TABLE
- t331 TABLE
- t332 TABLE
- t333 TABLE
- t334 TABLE
- t335 TABLE
- t336 TABLE
- t337 TABLE
- t338 TABLE
- t339 TABLE
- t340 TABLE
- t341 TABLE
- t342 TABLE
- t343 TABLE
- t344 TABLE
- t345 TABLE
- t346 TABLE
- t347 TABLE
- t348 TABLE
- t349 TABLE
- t350 TABLE
- t351 TABLE
- t352 TABLE
- t353 TABLE
- t354 TABLE
- t355 TABLE
- t356 TABLE
- t357 TABLE
- t358 TABLE
- t359 TABLE
- t360 TABLE
- t361 TABLE
- t362 TABLE
- t363 TABLE
- t364 TABLE
- t365 TABLE
- t366 TABLE
- t367 TABLE
- t368 TABLE
- t369 TABLE
- t370 TABLE
- t371 TABLE
- t372 TABLE
- t373 TABLE
- t374 TABLE
- t375 TABLE
- t376 TABLE
- t377 TABLE
- t378 TABLE
- t379 TABLE
- t380 TABLE
- t381 TABLE
- t382 TABLE
- t383 TABLE
- t384 TABLE
- t385 TABLE
- t386 TABLE
- t387 TABLE
- t388 TABLE
- t389 TABLE
- t390 TABLE
- t391 TABLE
- t392 TABLE
- t393 TABLE
- t394 TABLE
- t395 TABLE
- t396 TABLE
- t397 TABLE
- t398 TABLE
- t399 TABLE
+NULL NULL t000 TABLE NULL
+NULL NULL t001 TABLE NULL
+NULL NULL t002 TABLE NULL
+NULL NULL t003 TABLE NULL
+NULL NULL t004 TABLE NULL
+NULL NULL t005 TABLE NULL
+NULL NULL t006 TABLE NULL
+NULL NULL t007 TABLE NULL
+NULL NULL t008 TABLE NULL
+NULL NULL t009 TABLE NULL
+NULL NULL t010 TABLE NULL
+NULL NULL t011 TABLE NULL
+NULL NULL t012 TABLE NULL
+NULL NULL t013 TABLE NULL
+NULL NULL t014 TABLE NULL
+NULL NULL t015 TABLE NULL
+NULL NULL t016 TABLE NULL
+NULL NULL t017 TABLE NULL
+NULL NULL t018 TABLE NULL
+NULL NULL t019 TABLE NULL
+NULL NULL t020 TABLE NULL
+NULL NULL t021 TABLE NULL
+NULL NULL t022 TABLE NULL
+NULL NULL t023 TABLE NULL
+NULL NULL t024 TABLE NULL
+NULL NULL t025 TABLE NULL
+NULL NULL t026 TABLE NULL
+NULL NULL t027 TABLE NULL
+NULL NULL t028 TABLE NULL
+NULL NULL t029 TABLE NULL
+NULL NULL t030 TABLE NULL
+NULL NULL t031 TABLE NULL
+NULL NULL t032 TABLE NULL
+NULL NULL t033 TABLE NULL
+NULL NULL t034 TABLE NULL
+NULL NULL t035 TABLE NULL
+NULL NULL t036 TABLE NULL
+NULL NULL t037 TABLE NULL
+NULL NULL t038 TABLE NULL
+NULL NULL t039 TABLE NULL
+NULL NULL t040 TABLE NULL
+NULL NULL t041 TABLE NULL
+NULL NULL t042 TABLE NULL
+NULL NULL t043 TABLE NULL
+NULL NULL t044 TABLE NULL
+NULL NULL t045 TABLE NULL
+NULL NULL t046 TABLE NULL
+NULL NULL t047 TABLE NULL
+NULL NULL t048 TABLE NULL
+NULL NULL t049 TABLE NULL
+NULL NULL t050 TABLE NULL
+NULL NULL t051 TABLE NULL
+NULL NULL t052 TABLE NULL
+NULL NULL t053 TABLE NULL
+NULL NULL t054 TABLE NULL
+NULL NULL t055 TABLE NULL
+NULL NULL t056 TABLE NULL
+NULL NULL t057 TABLE NULL
+NULL NULL t058 TABLE NULL
+NULL NULL t059 TABLE NULL
+NULL NULL t060 TABLE NULL
+NULL NULL t061 TABLE NULL
+NULL NULL t062 TABLE NULL
+NULL NULL t063 TABLE NULL
+NULL NULL t064 TABLE NULL
+NULL NULL t065 TABLE NULL
+NULL NULL t066 TABLE NULL
+NULL NULL t067 TABLE NULL
+NULL NULL t068 TABLE NULL
+NULL NULL t069 TABLE NULL
+NULL NULL t070 TABLE NULL
+NULL NULL t071 TABLE NULL
+NULL NULL t072 TABLE NULL
+NULL NULL t073 TABLE NULL
+NULL NULL t074 TABLE NULL
+NULL NULL t075 TABLE NULL
+NULL NULL t076 TABLE NULL
+NULL NULL t077 TABLE NULL
+NULL NULL t078 TABLE NULL
+NULL NULL t079 TABLE NULL
+NULL NULL t080 TABLE NULL
+NULL NULL t081 TABLE NULL
+NULL NULL t082 TABLE NULL
+NULL NULL t083 TABLE NULL
+NULL NULL t084 TABLE NULL
+NULL NULL t085 TABLE NULL
+NULL NULL t086 TABLE NULL
+NULL NULL t087 TABLE NULL
+NULL NULL t088 TABLE NULL
+NULL NULL t089 TABLE NULL
+NULL NULL t090 TABLE NULL
+NULL NULL t091 TABLE NULL
+NULL NULL t092 TABLE NULL
+NULL NULL t093 TABLE NULL
+NULL NULL t094 TABLE NULL
+NULL NULL t095 TABLE NULL
+NULL NULL t096 TABLE NULL
+NULL NULL t097 TABLE NULL
+NULL NULL t098 TABLE NULL
+NULL NULL t099 TABLE NULL
+NULL NULL t1 TABLE NULL
+NULL NULL t100 TABLE NULL
+NULL NULL t101 TABLE NULL
+NULL NULL t102 TABLE NULL
+NULL NULL t103 TABLE NULL
+NULL NULL t104 TABLE NULL
+NULL NULL t105 TABLE NULL
+NULL NULL t106 TABLE NULL
+NULL NULL t107 TABLE NULL
+NULL NULL t108 TABLE NULL
+NULL NULL t109 TABLE NULL
+NULL NULL t110 TABLE NULL
+NULL NULL t111 TABLE NULL
+NULL NULL t112 TABLE NULL
+NULL NULL t113 TABLE NULL
+NULL NULL t114 TABLE NULL
+NULL NULL t115 TABLE NULL
+NULL NULL t116 TABLE NULL
+NULL NULL t117 TABLE NULL
+NULL NULL t118 TABLE NULL
+NULL NULL t119 TABLE NULL
+NULL NULL t120 TABLE NULL
+NULL NULL t121 TABLE NULL
+NULL NULL t122 TABLE NULL
+NULL NULL t123 TABLE NULL
+NULL NULL t124 TABLE NULL
+NULL NULL t125 TABLE NULL
+NULL NULL t126 TABLE NULL
+NULL NULL t127 TABLE NULL
+NULL NULL t128 TABLE NULL
+NULL NULL t129 TABLE NULL
+NULL NULL t130 TABLE NULL
+NULL NULL t131 TABLE NULL
+NULL NULL t132 TABLE NULL
+NULL NULL t133 TABLE NULL
+NULL NULL t134 TABLE NULL
+NULL NULL t135 TABLE NULL
+NULL NULL t136 TABLE NULL
+NULL NULL t137 TABLE NULL
+NULL NULL t138 TABLE NULL
+NULL NULL t139 TABLE NULL
+NULL NULL t140 TABLE NULL
+NULL NULL t141 TABLE NULL
+NULL NULL t142 TABLE NULL
+NULL NULL t143 TABLE NULL
+NULL NULL t144 TABLE NULL
+NULL NULL t145 TABLE NULL
+NULL NULL t146 TABLE NULL
+NULL NULL t147 TABLE NULL
+NULL NULL t148 TABLE NULL
+NULL NULL t149 TABLE NULL
+NULL NULL t150 TABLE NULL
+NULL NULL t151 TABLE NULL
+NULL NULL t152 TABLE NULL
+NULL NULL t153 TABLE NULL
+NULL NULL t154 TABLE NULL
+NULL NULL t155 TABLE NULL
+NULL NULL t156 TABLE NULL
+NULL NULL t157 TABLE NULL
+NULL NULL t158 TABLE NULL
+NULL NULL t159 TABLE NULL
+NULL NULL t160 TABLE NULL
+NULL NULL t161 TABLE NULL
+NULL NULL t162 TABLE NULL
+NULL NULL t163 TABLE NULL
+NULL NULL t164 TABLE NULL
+NULL NULL t165 TABLE NULL
+NULL NULL t166 TABLE NULL
+NULL NULL t167 TABLE NULL
+NULL NULL t168 TABLE NULL
+NULL NULL t169 TABLE NULL
+NULL NULL t170 TABLE NULL
+NULL NULL t171 TABLE NULL
+NULL NULL t172 TABLE NULL
+NULL NULL t173 TABLE NULL
+NULL NULL t174 TABLE NULL
+NULL NULL t175 TABLE NULL
+NULL NULL t176 TABLE NULL
+NULL NULL t177 TABLE NULL
+NULL NULL t178 TABLE NULL
+NULL NULL t179 TABLE NULL
+NULL NULL t180 TABLE NULL
+NULL NULL t181 TABLE NULL
+NULL NULL t182 TABLE NULL
+NULL NULL t183 TABLE NULL
+NULL NULL t184 TABLE NULL
+NULL NULL t185 TABLE NULL
+NULL NULL t186 TABLE NULL
+NULL NULL t187 TABLE NULL
+NULL NULL t188 TABLE NULL
+NULL NULL t189 TABLE NULL
+NULL NULL t190 TABLE NULL
+NULL NULL t191 TABLE NULL
+NULL NULL t192 TABLE NULL
+NULL NULL t193 TABLE NULL
+NULL NULL t194 TABLE NULL
+NULL NULL t195 TABLE NULL
+NULL NULL t196 TABLE NULL
+NULL NULL t197 TABLE NULL
+NULL NULL t198 TABLE NULL
+NULL NULL t199 TABLE NULL
+NULL NULL t200 TABLE NULL
+NULL NULL t201 TABLE NULL
+NULL NULL t202 TABLE NULL
+NULL NULL t203 TABLE NULL
+NULL NULL t204 TABLE NULL
+NULL NULL t205 TABLE NULL
+NULL NULL t206 TABLE NULL
+NULL NULL t207 TABLE NULL
+NULL NULL t208 TABLE NULL
+NULL NULL t209 TABLE NULL
+NULL NULL t210 TABLE NULL
+NULL NULL t211 TABLE NULL
+NULL NULL t212 TABLE NULL
+NULL NULL t213 TABLE NULL
+NULL NULL t214 TABLE NULL
+NULL NULL t215 TABLE NULL
+NULL NULL t216 TABLE NULL
+NULL NULL t217 TABLE NULL
+NULL NULL t218 TABLE NULL
+NULL NULL t219 TABLE NULL
+NULL NULL t220 TABLE NULL
+NULL NULL t221 TABLE NULL
+NULL NULL t222 TABLE NULL
+NULL NULL t223 TABLE NULL
+NULL NULL t224 TABLE NULL
+NULL NULL t225 TABLE NULL
+NULL NULL t226 TABLE NULL
+NULL NULL t227 TABLE NULL
+NULL NULL t228 TABLE NULL
+NULL NULL t229 TABLE NULL
+NULL NULL t230 TABLE NULL
+NULL NULL t231 TABLE NULL
+NULL NULL t232 TABLE NULL
+NULL NULL t233 TABLE NULL
+NULL NULL t234 TABLE NULL
+NULL NULL t235 TABLE NULL
+NULL NULL t236 TABLE NULL
+NULL NULL t237 TABLE NULL
+NULL NULL t238 TABLE NULL
+NULL NULL t239 TABLE NULL
+NULL NULL t240 TABLE NULL
+NULL NULL t241 TABLE NULL
+NULL NULL t242 TABLE NULL
+NULL NULL t243 TABLE NULL
+NULL NULL t244 TABLE NULL
+NULL NULL t245 TABLE NULL
+NULL NULL t246 TABLE NULL
+NULL NULL t247 TABLE NULL
+NULL NULL t248 TABLE NULL
+NULL NULL t249 TABLE NULL
+NULL NULL t250 TABLE NULL
+NULL NULL t251 TABLE NULL
+NULL NULL t252 TABLE NULL
+NULL NULL t253 TABLE NULL
+NULL NULL t254 TABLE NULL
+NULL NULL t255 TABLE NULL
+NULL NULL t256 TABLE NULL
+NULL NULL t257 TABLE NULL
+NULL NULL t258 TABLE NULL
+NULL NULL t259 TABLE NULL
+NULL NULL t260 TABLE NULL
+NULL NULL t261 TABLE NULL
+NULL NULL t262 TABLE NULL
+NULL NULL t263 TABLE NULL
+NULL NULL t264 TABLE NULL
+NULL NULL t265 TABLE NULL
+NULL NULL t266 TABLE NULL
+NULL NULL t267 TABLE NULL
+NULL NULL t268 TABLE NULL
+NULL NULL t269 TABLE NULL
+NULL NULL t270 TABLE NULL
+NULL NULL t271 TABLE NULL
+NULL NULL t272 TABLE NULL
+NULL NULL t273 TABLE NULL
+NULL NULL t274 TABLE NULL
+NULL NULL t275 TABLE NULL
+NULL NULL t276 TABLE NULL
+NULL NULL t277 TABLE NULL
+NULL NULL t278 TABLE NULL
+NULL NULL t279 TABLE NULL
+NULL NULL t280 TABLE NULL
+NULL NULL t281 TABLE NULL
+NULL NULL t282 TABLE NULL
+NULL NULL t283 TABLE NULL
+NULL NULL t284 TABLE NULL
+NULL NULL t285 TABLE NULL
+NULL NULL t286 TABLE NULL
+NULL NULL t287 TABLE NULL
+NULL NULL t288 TABLE NULL
+NULL NULL t289 TABLE NULL
+NULL NULL t290 TABLE NULL
+NULL NULL t291 TABLE NULL
+NULL NULL t292 TABLE NULL
+NULL NULL t293 TABLE NULL
+NULL NULL t294 TABLE NULL
+NULL NULL t295 TABLE NULL
+NULL NULL t296 TABLE NULL
+NULL NULL t297 TABLE NULL
+NULL NULL t298 TABLE NULL
+NULL NULL t299 TABLE NULL
+NULL NULL t300 TABLE NULL
+NULL NULL t301 TABLE NULL
+NULL NULL t302 TABLE NULL
+NULL NULL t303 TABLE NULL
+NULL NULL t304 TABLE NULL
+NULL NULL t305 TABLE NULL
+NULL NULL t306 TABLE NULL
+NULL NULL t307 TABLE NULL
+NULL NULL t308 TABLE NULL
+NULL NULL t309 TABLE NULL
+NULL NULL t310 TABLE NULL
+NULL NULL t311 TABLE NULL
+NULL NULL t312 TABLE NULL
+NULL NULL t313 TABLE NULL
+NULL NULL t314 TABLE NULL
+NULL NULL t315 TABLE NULL
+NULL NULL t316 TABLE NULL
+NULL NULL t317 TABLE NULL
+NULL NULL t318 TABLE NULL
+NULL NULL t319 TABLE NULL
+NULL NULL t320 TABLE NULL
+NULL NULL t321 TABLE NULL
+NULL NULL t322 TABLE NULL
+NULL NULL t323 TABLE NULL
+NULL NULL t324 TABLE NULL
+NULL NULL t325 TABLE NULL
+NULL NULL t326 TABLE NULL
+NULL NULL t327 TABLE NULL
+NULL NULL t328 TABLE NULL
+NULL NULL t329 TABLE NULL
+NULL NULL t330 TABLE NULL
+NULL NULL t331 TABLE NULL
+NULL NULL t332 TABLE NULL
+NULL NULL t333 TABLE NULL
+NULL NULL t334 TABLE NULL
+NULL NULL t335 TABLE NULL
+NULL NULL t336 TABLE NULL
+NULL NULL t337 TABLE NULL
+NULL NULL t338 TABLE NULL
+NULL NULL t339 TABLE NULL
+NULL NULL t340 TABLE NULL
+NULL NULL t341 TABLE NULL
+NULL NULL t342 TABLE NULL
+NULL NULL t343 TABLE NULL
+NULL NULL t344 TABLE NULL
+NULL NULL t345 TABLE NULL
+NULL NULL t346 TABLE NULL
+NULL NULL t347 TABLE NULL
+NULL NULL t348 TABLE NULL
+NULL NULL t349 TABLE NULL
+NULL NULL t350 TABLE NULL
+NULL NULL t351 TABLE NULL
+NULL NULL t352 TABLE NULL
+NULL NULL t353 TABLE NULL
+NULL NULL t354 TABLE NULL
+NULL NULL t355 TABLE NULL
+NULL NULL t356 TABLE NULL
+NULL NULL t357 TABLE NULL
+NULL NULL t358 TABLE NULL
+NULL NULL t359 TABLE NULL
+NULL NULL t360 TABLE NULL
+NULL NULL t361 TABLE NULL
+NULL NULL t362 TABLE NULL
+NULL NULL t363 TABLE NULL
+NULL NULL t364 TABLE NULL
+NULL NULL t365 TABLE NULL
+NULL NULL t366 TABLE NULL
+NULL NULL t367 TABLE NULL
+NULL NULL t368 TABLE NULL
+NULL NULL t369 TABLE NULL
+NULL NULL t370 TABLE NULL
+NULL NULL t371 TABLE NULL
+NULL NULL t372 TABLE NULL
+NULL NULL t373 TABLE NULL
+NULL NULL t374 TABLE NULL
+NULL NULL t375 TABLE NULL
+NULL NULL t376 TABLE NULL
+NULL NULL t377 TABLE NULL
+NULL NULL t378 TABLE NULL
+NULL NULL t379 TABLE NULL
+NULL NULL t380 TABLE NULL
+NULL NULL t381 TABLE NULL
+NULL NULL t382 TABLE NULL
+NULL NULL t383 TABLE NULL
+NULL NULL t384 TABLE NULL
+NULL NULL t385 TABLE NULL
+NULL NULL t386 TABLE NULL
+NULL NULL t387 TABLE NULL
+NULL NULL t388 TABLE NULL
+NULL NULL t389 TABLE NULL
+NULL NULL t390 TABLE NULL
+NULL NULL t391 TABLE NULL
+NULL NULL t392 TABLE NULL
+NULL NULL t393 TABLE NULL
+NULL NULL t394 TABLE NULL
+NULL NULL t395 TABLE NULL
+NULL NULL t396 TABLE NULL
+NULL NULL t397 TABLE NULL
+NULL NULL t398 TABLE NULL
+NULL NULL t399 TABLE NULL
DROP TABLE t1;
diff --git a/storage/connect/mysql-test/connect/r/odbc_sqlite3_grant.result b/storage/connect/mysql-test/connect/r/odbc_sqlite3_grant.result
index 06b4239bd69..f9045e73862 100644
--- a/storage/connect/mysql-test/connect/r/odbc_sqlite3_grant.result
+++ b/storage/connect/mysql-test/connect/r/odbc_sqlite3_grant.result
@@ -1,7 +1,7 @@
Table Create Table
t1 CREATE TABLE `t1` (
`Description` char(128) NOT NULL,
- `Attributes` varchar(256) NOT NULL
+ `Attributes` varchar(256) DEFAULT NULL
) ENGINE=CONNECT DEFAULT CHARSET=latin1 `TABLE_TYPE`='ODBC' `CATFUNC`='Drivers'
SET NAMES utf8;
GRANT ALL PRIVILEGES ON *.* TO user@localhost;
diff --git a/storage/connect/mysql-test/connect/r/odbc_xls.result b/storage/connect/mysql-test/connect/r/odbc_xls.result
index 8c560ef013a..d379cb5b4bb 100644
--- a/storage/connect/mysql-test/connect/r/odbc_xls.result
+++ b/storage/connect/mysql-test/connect/r/odbc_xls.result
@@ -1,7 +1,7 @@
Table Create Table
t1 CREATE TABLE `t1` (
`Name` varchar(256) NOT NULL,
- `Description` varchar(256) NOT NULL
+ `Description` varchar(256) DEFAULT NULL
) ENGINE=CONNECT DEFAULT CHARSET=latin1 `TABLE_TYPE`='ODBC' `CATFUNC`='Sources'
CREATE TABLE contact (Nom VARCHAR(128), Fonction VARCHAR(128), Company VARCHAR(128), Repertoire VARCHAR(30)) ENGINE=CONNECT TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineXLS;DBQ=DATADIR/test/contacts.xls';;
SELECT Nom, Fonction FROM contact WHERE Repertoire='ascii';
@@ -16,11 +16,11 @@ DROP TABLE contact;
CREATE TABLE t1 ENGINE=CONNECT CATFUNC=Tables TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineXLS;DBQ=DATADIR/test/contacts.xls' CHARSET=utf8 DATA_CHARSET=latin1;;
SELECT * FROM t1 WHERE Table_name='CONTACT';
Table_Cat Table_Schema Table_Name Table_Type Remark
-DATADIR/test/contacts CONTACT TABLE
+DATADIR/test/contacts NULL CONTACT TABLE NULL
DROP TABLE t1;
CREATE TABLE t1 ENGINE=CONNECT CATFUNC=Columns TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineXLS;DBQ=DATADIR/test/contacts.xls' CHARSET=utf8 DATA_CHARSET=latin1;;
SELECT * FROM t1 WHERE Table_name='CONTACT' AND Column_name IN ('Nom','Fonction');
Table_Cat Table_Schema Table_Name Column_Name Data_Type Type_Name Column_Size Buffer_Length Decimal_Digits Radix Nullable Remarks
-DATADIR/test/contacts CONTACT Nom 12 VARCHAR 255 510 0 0 1
-DATADIR/test/contacts CONTACT Fonction 12 VARCHAR 255 510 0 0 1
+DATADIR/test/contacts NULL CONTACT Nom 12 VARCHAR 255 510 NULL NULL 1 NULL
+DATADIR/test/contacts NULL CONTACT Fonction 12 VARCHAR 255 510 NULL NULL 1 NULL
DROP TABLE t1;
diff --git a/storage/connect/mysql-test/connect/t/json_udf.inc b/storage/connect/mysql-test/connect/t/json_udf.inc
index f17d59832f3..2ade7ad02fe 100644
--- a/storage/connect/mysql-test/connect/t/json_udf.inc
+++ b/storage/connect/mysql-test/connect/t/json_udf.inc
@@ -20,6 +20,8 @@ if (!$HA_CONNECT_SO) {
--eval CREATE FUNCTION json_object_delete RETURNS STRING SONAME '$HA_CONNECT_SO';
--eval CREATE FUNCTION json_object_list RETURNS STRING SONAME '$HA_CONNECT_SO';
--eval CREATE FUNCTION jsonvalue RETURNS STRING SONAME '$HA_CONNECT_SO';
+--eval CREATE FUNCTION jsonset_grp_size RETURNS INTEGER SONAME '$HA_CONNECT_SO';
+--eval CREATE FUNCTION jsonget_grp_size RETURNS INTEGER SONAME '$HA_CONNECT_SO';
--eval CREATE AGGREGATE FUNCTION json_array_grp RETURNS STRING SONAME '$HA_CONNECT_SO';
--eval CREATE AGGREGATE FUNCTION json_object_grp RETURNS STRING SONAME '$HA_CONNECT_SO';
--eval CREATE FUNCTION jsonget_string RETURNS STRING SONAME '$HA_CONNECT_SO';
diff --git a/storage/connect/mysql-test/connect/t/json_udf.test b/storage/connect/mysql-test/connect/t/json_udf.test
index cfd1fdae258..d11e2fd7cf6 100644
--- a/storage/connect/mysql-test/connect/t/json_udf.test
+++ b/storage/connect/mysql-test/connect/t/json_udf.test
@@ -108,7 +108,8 @@ CREATE TABLE t3 (
SELECT Json_Object(SERIALNO, NAME, TITLE, SALARY) FROM t3 WHERE NAME = 'MERCHANT';
SELECT DEPARTMENT, Json_Array_Grp(NAME) FROM t3 GROUP BY DEPARTMENT;
-SET connect_json_grp_size=30;
+#SET connect_json_grp_size=30; Deprecated
+SELECT JsonSet_Grp_Size(30);
SELECT Json_Object(title, Json_Array_Grp(name) `json_names`) from t3 GROUP BY title;
SELECT Json_Array(DEPARTMENT, Json_Array_Grp(NAME)) FROM t3 GROUP BY DEPARTMENT;
SELECT Json_Object(DEPARTMENT, Json_Array_Grp(NAME) json_NAMES) FROM t3 GROUP BY DEPARTMENT;
diff --git a/storage/connect/mysql-test/connect/t/json_udf2.inc b/storage/connect/mysql-test/connect/t/json_udf2.inc
index f62b178b003..4c74e2c11f2 100644
--- a/storage/connect/mysql-test/connect/t/json_udf2.inc
+++ b/storage/connect/mysql-test/connect/t/json_udf2.inc
@@ -11,6 +11,8 @@ DROP FUNCTION json_object_add;
DROP FUNCTION json_object_delete;
DROP FUNCTION json_object_list;
DROP FUNCTION jsonvalue;
+DROP FUNCTION jsonset_grp_size;
+DROP FUNCTION jsonget_grp_size;
DROP FUNCTION json_array_grp;
DROP FUNCTION json_object_grp;
DROP FUNCTION jsonget_string;
diff --git a/storage/connect/odbconn.cpp b/storage/connect/odbconn.cpp
index 1ccdf231970..cb21a8bda15 100644
--- a/storage/connect/odbconn.cpp
+++ b/storage/connect/odbconn.cpp
@@ -1,7 +1,7 @@
/************ Odbconn C++ Functions Source Code File (.CPP) ************/
/* Name: ODBCONN.CPP Version 2.2 */
/* */
-/* (C) Copyright to the author Olivier BERTRAND 1998-2015 */
+/* (C) Copyright to the author Olivier BERTRAND 1998-2016 */
/* */
/* This file contains the ODBC connection classes functions. */
/***********************************************************************/
@@ -314,8 +314,10 @@ PQRYRES ODBCColumns(PGLOBAL g, char *dsn, char *db, char *table,
FLD_TYPE, FLD_TYPENAME, FLD_PREC, FLD_LENGTH,
FLD_SCALE, FLD_RADIX, FLD_NULL, FLD_REM};
unsigned int length[] = {0, 0, 0, 0, 6, 0, 10, 10, 6, 6, 6, 0};
- int n, ncol = 12;
- PQRYRES qrp;
+ bool b[] = {true,true,false,false,false,false,false,false,true,true,false,true};
+ int i, n, ncol = 12;
+ PCOLRES crp;
+ PQRYRES qrp;
CATPARM *cap;
ODBConn *ocp = NULL;
@@ -363,6 +365,10 @@ PQRYRES ODBCColumns(PGLOBAL g, char *dsn, char *db, char *table,
qrp = PlgAllocResult(g, ncol, maxres, IDS_COLUMNS,
buftyp, fldtyp, length, false, true);
+ for (i = 0, crp = qrp->Colresp; crp; i++, crp = crp->Next)
+ if (b[i])
+ crp->Kdata->SetNullable(true);
+
if (info || !qrp) // Info table
return qrp;
@@ -495,8 +501,10 @@ PQRYRES ODBCDrivers(PGLOBAL g, int maxres, bool info)
int buftyp[] = {TYPE_STRING, TYPE_STRING};
XFLD fldtyp[] = {FLD_NAME, FLD_REM};
unsigned int length[] = {128, 256};
- int ncol = 2;
- PQRYRES qrp;
+ bool b[] = {false, true};
+ int i, ncol = 2;
+ PCOLRES crp;
+ PQRYRES qrp;
ODBConn *ocp = NULL;
/************************************************************************/
@@ -520,7 +528,11 @@ PQRYRES ODBCDrivers(PGLOBAL g, int maxres, bool info)
qrp = PlgAllocResult(g, ncol, maxres, IDS_DRIVER,
buftyp, fldtyp, length, false, true);
- /************************************************************************/
+ for (i = 0, crp = qrp->Colresp; crp; i++, crp = crp->Next)
+ if (b[i])
+ crp->Kdata->SetNullable(true);
+
+ /************************************************************************/
/* Now get the results into blocks. */
/************************************************************************/
if (!info && qrp && ocp->GetDrivers(qrp))
@@ -542,8 +554,10 @@ PQRYRES ODBCDataSources(PGLOBAL g, int maxres, bool info)
int buftyp[] = {TYPE_STRING, TYPE_STRING};
XFLD fldtyp[] = {FLD_NAME, FLD_REM};
unsigned int length[] = {0, 256};
- int n = 0, ncol = 2;
- PQRYRES qrp;
+ bool b[] = {false, true};
+ int i, n = 0, ncol = 2;
+ PCOLRES crp;
+ PQRYRES qrp;
ODBConn *ocp = NULL;
/************************************************************************/
@@ -571,7 +585,11 @@ PQRYRES ODBCDataSources(PGLOBAL g, int maxres, bool info)
qrp = PlgAllocResult(g, ncol, maxres, IDS_DSRC,
buftyp, fldtyp, length, false, true);
- /************************************************************************/
+ for (i = 0, crp = qrp->Colresp; crp; i++, crp = crp->Next)
+ if (b[i])
+ crp->Kdata->SetNullable(true);
+
+ /************************************************************************/
/* Now get the results into blocks. */
/************************************************************************/
if (!info && qrp && ocp->GetDataSources(qrp))
@@ -595,8 +613,10 @@ PQRYRES ODBCTables(PGLOBAL g, char *dsn, char *db, char *tabpat,
XFLD fldtyp[] = {FLD_CAT, FLD_SCHEM, FLD_NAME,
FLD_TYPE, FLD_REM};
unsigned int length[] = {0, 0, 0, 16, 0};
- int n, ncol = 5;
- PQRYRES qrp;
+ bool b[] ={ true, true, false, false, true };
+ int i, n, ncol = 5;
+ PCOLRES crp;
+ PQRYRES qrp;
CATPARM *cap;
ODBConn *ocp = NULL;
@@ -638,7 +658,11 @@ PQRYRES ODBCTables(PGLOBAL g, char *dsn, char *db, char *tabpat,
qrp = PlgAllocResult(g, ncol, maxres, IDS_TABLES, buftyp,
fldtyp, length, false, true);
- if (info || !qrp)
+ for (i = 0, crp = qrp->Colresp; crp; i++, crp = crp->Next)
+ if (b[i])
+ crp->Kdata->SetNullable(true);
+
+ if (info || !qrp)
return qrp;
if (!(cap = AllocCatInfo(g, CAT_TAB, db, tabpat, qrp)))
@@ -2249,7 +2273,7 @@ int ODBConn::GetCatInfo(CATPARM *cap)
rc = SQLTables(hstmt, name.ptr(2), name.length(2),
name.ptr(1), name.length(1),
name.ptr(0), name.length(0),
- cap->Pat, SQL_NTS);
+ cap->Pat, cap->Pat ? SQL_NTS : 0);
break;
case CAT_COL:
// rc = SQLSetStmtAttr(hstmt, SQL_ATTR_METADATA_ID,
@@ -2258,7 +2282,7 @@ int ODBConn::GetCatInfo(CATPARM *cap)
rc = SQLColumns(hstmt, name.ptr(2), name.length(2),
name.ptr(1), name.length(1),
name.ptr(0), name.length(0),
- cap->Pat, SQL_NTS);
+ cap->Pat, cap->Pat ? SQL_NTS : 0);
break;
case CAT_KEY:
fnc = "SQLPrimaryKeys";
diff --git a/storage/connect/plgdbutl.cpp b/storage/connect/plgdbutl.cpp
index 9e236da2d93..1ec1108c639 100644
--- a/storage/connect/plgdbutl.cpp
+++ b/storage/connect/plgdbutl.cpp
@@ -679,7 +679,8 @@ void PlugConvertConstant(PGLOBAL g, void* & value, short& type)
/* non quoted blanks are not included in the output format. */
/***********************************************************************/
PDTP MakeDateFormat(PGLOBAL g, PSZ dfmt, bool in, bool out, int flag)
- {
+{
+ int rc;
PDTP pdp = (PDTP)PlugSubAlloc(g, NULL, sizeof(DATPAR));
if (trace)
@@ -708,7 +709,7 @@ PDTP MakeDateFormat(PGLOBAL g, PSZ dfmt, bool in, bool out, int flag)
pthread_mutex_lock(&parmut);
#endif // !__WIN__
#endif // THREAD
- /*int rc =*/ fmdflex(pdp);
+ rc = fmdflex(pdp);
#if defined(THREAD)
#if defined(__WIN__)
LeaveCriticalSection((LPCRITICAL_SECTION)&parsec);
@@ -718,9 +719,10 @@ PDTP MakeDateFormat(PGLOBAL g, PSZ dfmt, bool in, bool out, int flag)
#endif // THREAD
if (trace)
- htrc("Done: in=%s out=%s\n", SVP(pdp->InFmt), SVP(pdp->OutFmt));
+ htrc("Done: in=%s out=%s rc=%d\n", SVP(pdp->InFmt), SVP(pdp->OutFmt), rc);
+
return pdp;
- } // end of MakeDateFormat
+} // end of MakeDateFormat
/***********************************************************************/
/* Extract the date from a formatted string according to format. */
diff --git a/storage/connect/reldef.cpp b/storage/connect/reldef.cpp
index 8f9328c0b2f..e455bc8f1a5 100644
--- a/storage/connect/reldef.cpp
+++ b/storage/connect/reldef.cpp
@@ -1,11 +1,11 @@
/************* RelDef CPP Program Source Code File (.CPP) **************/
/* PROGRAM NAME: RELDEF */
/* ------------- */
-/* Version 1.4 */
+/* Version 1.5 */
/* */
/* COPYRIGHT: */
/* ---------- */
-/* (C) Copyright to the author Olivier BERTRAND 2004-2015 */
+/* (C) Copyright to the author Olivier BERTRAND 2004-2016 */
/* */
/* WHAT THIS PROGRAM DOES: */
/* ----------------------- */
@@ -37,6 +37,7 @@
#include "plgdbsem.h"
#include "reldef.h"
#include "colblk.h"
+#include "tabcol.h"
#include "filamap.h"
#include "filamfix.h"
#include "filamvct.h"
@@ -217,11 +218,13 @@ TABDEF::TABDEF(void)
/***********************************************************************/
/* Define: initialize the table definition block from XDB file. */
/***********************************************************************/
-bool TABDEF::Define(PGLOBAL g, PCATLG cat, LPCSTR name, LPCSTR am)
+bool TABDEF::Define(PGLOBAL g, PCATLG cat,
+ LPCSTR name, LPCSTR schema, LPCSTR am)
{
int poff = 0;
- Name = (PSZ)PlugDup(g, name);
+ Name = (PSZ)name;
+ Schema = (PSZ)schema;
Cat = cat;
Hc = ((MYCAT*)cat)->GetHandler();
Catfunc = GetFuncID(GetStringCatInfo(g, "Catfunc", NULL));
@@ -569,7 +572,7 @@ PTABDEF OEMDEF::GetXdef(PGLOBAL g)
} // endif Cbuf
// Here "OEM" should be replace by a more useful value
- if (xdefp->Define(g, cat, Name, "OEM"))
+ if (xdefp->Define(g, cat, Name, Schema, "OEM"))
return NULL;
// Ok, return external block
diff --git a/storage/connect/reldef.h b/storage/connect/reldef.h
index dada5716dbe..bc1bd2ddd74 100644
--- a/storage/connect/reldef.h
+++ b/storage/connect/reldef.h
@@ -1,7 +1,7 @@
/*************** RelDef H Declares Source Code File (.H) ***************/
-/* Name: RELDEF.H Version 1.5 */
+/* Name: RELDEF.H Version 1.6 */
/* */
-/* (C) Copyright to the author Olivier BERTRAND 2004-2015 */
+/* (C) Copyright to the author Olivier BERTRAND 2004-2016 */
/* */
/* This file contains the DEF classes definitions. */
/***********************************************************************/
@@ -50,7 +50,8 @@ class DllExport RELDEF : public BLOCK { // Relation definition block
int GetCharCatInfo(PSZ what, PSZ sdef, char *buf, int size);
char *GetStringCatInfo(PGLOBAL g, PSZ what, PSZ sdef);
virtual int Indexable(void) {return 0;}
- virtual bool Define(PGLOBAL g, PCATLG cat, LPCSTR name, LPCSTR am) = 0;
+ virtual bool Define(PGLOBAL g, PCATLG cat,
+ LPCSTR name, LPCSTR schema, LPCSTR am) = 0;
virtual PTDB GetTable(PGLOBAL g, MODE mode) = 0;
protected:
@@ -97,8 +98,9 @@ class DllExport TABDEF : public RELDEF { /* Logical table descriptor */
int GetColCatInfo(PGLOBAL g);
void SetIndexInfo(void);
bool DropTable(PGLOBAL g, PSZ name);
- virtual bool Define(PGLOBAL g, PCATLG cat, LPCSTR name, LPCSTR am);
- virtual bool DefineAM(PGLOBAL, LPCSTR, int) = 0;
+ virtual bool Define(PGLOBAL g, PCATLG cat,
+ LPCSTR name, LPCSTR schema, LPCSTR am);
+ virtual bool DefineAM(PGLOBAL, LPCSTR, int) = 0;
protected:
// Members
diff --git a/storage/connect/table.cpp b/storage/connect/table.cpp
index 933e072c1bb..c21bb1660ea 100644
--- a/storage/connect/table.cpp
+++ b/storage/connect/table.cpp
@@ -1,7 +1,7 @@
/************** Table C++ Functions Source Code File (.CPP) ************/
/* Name: TABLE.CPP Version 2.7 */
/* */
-/* (C) Copyright to the author Olivier BERTRAND 1999-2015 */
+/* (C) Copyright to the author Olivier BERTRAND 1999-2016 */
/* */
/* This file contains the TBX, TDB and OPJOIN classes functions. */
/***********************************************************************/
@@ -518,7 +518,8 @@ bool TDBCAT::InitCol(PGLOBAL g)
sprintf(g->Message, "Invalid flag %d for column %s",
colp->Flag, colp->Name);
return true;
- } // endif Crp
+ } else if (crp->Fld == FLD_SCALE || crp->Fld == FLD_RADIX)
+ colp->Value->SetNullable(true);
} // endfor colp
@@ -586,11 +587,14 @@ CATCOL::CATCOL(PCOLDEF cdp, PTDB tdbp, int n)
/***********************************************************************/
void CATCOL::ReadColumn(PGLOBAL)
{
+ bool b = (!Crp->Kdata || Crp->Kdata->IsNull(Tdbp->N));
+
// Get the value of the Name or Description property
- if (Crp->Kdata)
+ if (!b)
Value->SetValue_pvblk(Crp->Kdata, Tdbp->N);
else
Value->Reset();
+ Value->SetNull(b);
} // end of ReadColumn
diff --git a/storage/connect/tabmysql.cpp b/storage/connect/tabmysql.cpp
index 658f3513b07..b9cede52a21 100644
--- a/storage/connect/tabmysql.cpp
+++ b/storage/connect/tabmysql.cpp
@@ -334,7 +334,7 @@ bool MYSQLDEF::DefineAM(PGLOBAL g, LPCSTR am, int)
Delayed = !!GetIntCatInfo("Delayed", 0);
} else {
// MYSQL access from a PROXY table
- Database = GetStringCatInfo(g, "Database", "*");
+ Database = GetStringCatInfo(g, "Database", Schema ? Schema : "*");
Isview = GetBoolCatInfo("View", false);
// We must get other connection parms from the calling table
diff --git a/storage/connect/tabpivot.cpp b/storage/connect/tabpivot.cpp
index b628e26d3c7..256b454741c 100644
--- a/storage/connect/tabpivot.cpp
+++ b/storage/connect/tabpivot.cpp
@@ -348,7 +348,7 @@ bool PIVOTDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff)
return TRUE;
Tabname = (char*)Tablep->GetName();
- DB = (char*)Tablep->GetQualifier();
+ DB = (char*)Tablep->GetSchema();
Tabsrc = (char*)Tablep->GetSrc();
Host = GetStringCatInfo(g, "Host", "localhost");
@@ -529,7 +529,7 @@ bool TDBPIVOT::GetSourceTable(PGLOBAL g)
// Get the new table description block of this source table
PTABLE tablep = new(g) XTAB("whatever", Tabsrc);
- tablep->SetQualifier(Database);
+ tablep->SetSchema(Database);
if (!(Tdbp = GetSubTable(g, tablep, true)))
return true;
diff --git a/storage/connect/tabtbl.cpp b/storage/connect/tabtbl.cpp
index 7f979eaf4be..6b72c715517 100644
--- a/storage/connect/tabtbl.cpp
+++ b/storage/connect/tabtbl.cpp
@@ -5,7 +5,7 @@
/* */
/* COPYRIGHT: */
/* ---------- */
-/* (C) Copyright to PlugDB Software Development 2008-2015 */
+/* (C) Copyright to PlugDB Software Development 2008-2016 */
/* Author: Olivier BERTRAND */
/* */
/* WHAT THIS PROGRAM DOES: */
@@ -130,10 +130,10 @@ bool TBLDEF::DefineAM(PGLOBAL g, LPCSTR, int)
// Allocate the TBLIST block for that table
tbl = new(g) XTAB(pn, def);
- tbl->SetQualifier(pdb);
+ tbl->SetSchema(pdb);
if (trace)
- htrc("TBL: Name=%s db=%s\n", tbl->GetName(), tbl->GetQualifier());
+ htrc("TBL: Name=%s db=%s\n", tbl->GetName(), tbl->GetSchema());
// Link the blocks
if (Tablep)
diff --git a/storage/connect/tabutil.cpp b/storage/connect/tabutil.cpp
index 331a7f45d4d..4069cdbed2a 100644
--- a/storage/connect/tabutil.cpp
+++ b/storage/connect/tabutil.cpp
@@ -1,7 +1,7 @@
/************* Tabutil cpp Declares Source Code File (.CPP) ************/
/* Name: TABUTIL.CPP Version 1.1 */
/* */
-/* (C) Copyright to the author Olivier BERTRAND 2013 - 2015 */
+/* (C) Copyright to the author Olivier BERTRAND 2013 - 2016 */
/* */
/* Utility function used by the PROXY, XCOL, OCCUR, and TBL tables. */
/***********************************************************************/
@@ -118,7 +118,7 @@ PQRYRES TabColumns(PGLOBAL g, THD *thd, const char *db,
FLD_LENGTH, FLD_SCALE, FLD_RADIX, FLD_NULL,
FLD_REM, FLD_NO, FLD_CHARSET};
unsigned int length[] = {0, 4, 16, 4, 4, 4, 4, 4, 0, 32, 32};
- char *fld, *colname, *chset, *fmt, v;
+ char *pn, *tn, *fld, *colname, *chset, *fmt, v;
int i, n, ncol = sizeof(buftyp) / sizeof(int);
int prec, len, type, scale;
int zconv = GetConvSize();
@@ -130,7 +130,16 @@ PQRYRES TabColumns(PGLOBAL g, THD *thd, const char *db,
PCOLRES crp;
if (!info) {
- if (!(s = GetTableShare(g, thd, db, name, mysql))) {
+ // Analyze the table name, it may have the format: [dbname.]tabname
+ if (strchr((char*)name, '.')) {
+ tn = (char*)PlugDup(g, name);
+ pn = strchr(tn, '.');
+ *pn++ = 0;
+ db = tn;
+ name = pn;
+ } // endif pn
+
+ if (!(s = GetTableShare(g, thd, db, name, mysql))) {
return NULL;
} else if (s->is_view) {
strcpy(g->Message, "Use MYSQL type to see columns from a view");
@@ -315,7 +324,7 @@ bool PRXDEF::DefineAM(PGLOBAL g, LPCSTR, int)
} // endif pn
Tablep = new(g) XTAB(tab, def);
- Tablep->SetQualifier(db);
+ Tablep->SetSchema(db);
return false;
} // end of DefineAM
@@ -379,12 +388,12 @@ PTDBASE TDBPRX::GetSubTable(PGLOBAL g, PTABLE tabp, bool b)
LPCSTR cdb, curdb = hc->GetDBName(NULL);
THD *thd = (hc->GetTable())->in_use;
- db = (char*)tabp->GetQualifier();
+ db = (char*)(tabp->GetSchema() ? tabp->GetSchema() : curdb);
name = (char*)tabp->GetName();
// Check for eventual loop
for (PTABLE tp = To_Table; tp; tp = tp->Next) {
- cdb = (tp->Qualifier) ? tp->Qualifier : curdb;
+ cdb = (tp->Schema) ? tp->Schema : curdb;
if (!stricmp(name, tp->Name) && !stricmp(db, cdb)) {
sprintf(g->Message, "Table %s.%s pointing on itself", db, name);
@@ -423,7 +432,7 @@ PTDBASE TDBPRX::GetSubTable(PGLOBAL g, PTABLE tabp, bool b)
} // endif Define
if (db)
- ((PTDBMY)tdbp)->SetDatabase(tabp->GetQualifier());
+ ((PTDBMY)tdbp)->SetDatabase(tabp->GetSchema());
if (Mode == MODE_UPDATE || Mode == MODE_DELETE)
tdbp->SetName(Name); // For Make_Command
@@ -757,7 +766,7 @@ void PRXCOL::WriteColumn(PGLOBAL g)
/***********************************************************************/
TDBTBC::TDBTBC(PPRXDEF tdp) : TDBCAT(tdp)
{
- Db = (PSZ)tdp->Tablep->GetQualifier();
+ Db = (PSZ)tdp->Tablep->GetSchema();
Tab = (PSZ)tdp->Tablep->GetName();
} // end of TDBTBC constructor
diff --git a/storage/connect/valblk.h b/storage/connect/valblk.h
index f6eb7258a77..c3cad79b234 100644
--- a/storage/connect/valblk.h
+++ b/storage/connect/valblk.h
@@ -73,7 +73,8 @@ class VALBLK : public BLOCK {
virtual void SetNull(int n, bool b)
{if (To_Nulls) {To_Nulls[n] = (b) ? '*' : 0;}}
virtual bool IsNull(int n) {return To_Nulls && To_Nulls[n];}
- virtual void SetNullable(bool b);
+ virtual bool IsNullable(void) {return Nullable;}
+ virtual void SetNullable(bool b);
virtual bool IsUnsigned(void) {return Unsigned;}
virtual bool Init(PGLOBAL g, bool check) = 0;
virtual int GetVlen(void) = 0;
diff --git a/storage/innobase/buf/buf0dump.cc b/storage/innobase/buf/buf0dump.cc
index bf757dc5d89..249761b23c0 100644
--- a/storage/innobase/buf/buf0dump.cc
+++ b/storage/innobase/buf/buf0dump.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 2011, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2011, 2015, Oracle and/or its affiliates. All Rights Reserved.
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
@@ -167,6 +167,25 @@ buf_load_status(
va_end(ap);
}
+/** Returns the directory path where the buffer pool dump file will be created.
+@return directory path */
+static
+const char*
+get_buf_dump_dir()
+{
+ const char* dump_dir;
+
+ /* The dump file should be created in the default data directory if
+ innodb_data_home_dir is set as an empty string. */
+ if (strcmp(srv_data_home, "") == 0) {
+ dump_dir = fil_path_to_mysql_datadir;
+ } else {
+ dump_dir = srv_data_home;
+ }
+
+ return(dump_dir);
+}
+
/*****************************************************************//**
Perform a buffer pool dump into the file specified by
innodb_buffer_pool_filename. If any errors occur then the value of
@@ -190,7 +209,7 @@ buf_dump(
int ret;
ut_snprintf(full_filename, sizeof(full_filename),
- "%s%c%s", srv_data_home, SRV_PATH_SEPARATOR,
+ "%s%c%s", get_buf_dump_dir(), SRV_PATH_SEPARATOR,
srv_buf_dump_filename);
ut_snprintf(tmp_filename, sizeof(tmp_filename),
@@ -463,7 +482,7 @@ buf_load()
buf_load_abort_flag = FALSE;
ut_snprintf(full_filename, sizeof(full_filename),
- "%s%c%s", srv_data_home, SRV_PATH_SEPARATOR,
+ "%s%c%s", get_buf_dump_dir(), SRV_PATH_SEPARATOR,
srv_buf_dump_filename);
buf_load_status(STATUS_NOTICE,
diff --git a/storage/innobase/dict/dict0dict.cc b/storage/innobase/dict/dict0dict.cc
index 697c9f19f40..918d827eda3 100644
--- a/storage/innobase/dict/dict0dict.cc
+++ b/storage/innobase/dict/dict0dict.cc
@@ -1107,7 +1107,7 @@ dict_init(void)
&dict_operation_lock, SYNC_DICT_OPERATION);
if (!srv_read_only_mode) {
- dict_foreign_err_file = os_file_create_tmpfile();
+ dict_foreign_err_file = os_file_create_tmpfile(NULL);
ut_a(dict_foreign_err_file);
mutex_create(dict_foreign_err_mutex_key,
diff --git a/storage/innobase/dict/dict0stats.cc b/storage/innobase/dict/dict0stats.cc
index 1eac9e0df51..b073398f8ec 100644
--- a/storage/innobase/dict/dict0stats.cc
+++ b/storage/innobase/dict/dict0stats.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 2009, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2009, 2015, Oracle and/or its affiliates. All Rights Reserved.
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
@@ -1436,7 +1436,6 @@ on the leaf page.
when comparing records
@param[out] n_diff number of distinct records
@param[out] n_external_pages number of external pages
-@param[in,out] mtr mini-transaction
@return number of distinct records on the leaf page */
static
void
@@ -1444,8 +1443,7 @@ dict_stats_analyze_index_below_cur(
const btr_cur_t* cur,
ulint n_prefix,
ib_uint64_t* n_diff,
- ib_uint64_t* n_external_pages,
- mtr_t* mtr)
+ ib_uint64_t* n_external_pages)
{
dict_index_t* index;
ulint space;
@@ -1459,6 +1457,7 @@ dict_stats_analyze_index_below_cur(
ulint* offsets2;
ulint* offsets_rec;
ulint size;
+ mtr_t mtr;
index = btr_cur_get_index(cur);
@@ -1497,12 +1496,14 @@ dict_stats_analyze_index_below_cur(
function without analyzing any leaf pages */
*n_external_pages = 0;
+ mtr_start(&mtr);
+
/* descend to the leaf level on the B-tree */
for (;;) {
block = buf_page_get_gen(space, zip_size, page_no, RW_S_LATCH,
NULL /* no guessed block */,
- BUF_GET, __FILE__, __LINE__, mtr);
+ BUF_GET, __FILE__, __LINE__, &mtr);
page = buf_block_get_frame(block);
@@ -1524,6 +1525,8 @@ dict_stats_analyze_index_below_cur(
ut_a(*n_diff > 0);
if (*n_diff == 1) {
+ mtr_commit(&mtr);
+
/* page has all keys equal and the end of the page
was reached by dict_stats_scan_page(), no need to
descend to the leaf level */
@@ -1548,7 +1551,7 @@ dict_stats_analyze_index_below_cur(
}
/* make sure we got a leaf page as a result from the above loop */
- ut_ad(btr_page_get_level(page, mtr) == 0);
+ ut_ad(btr_page_get_level(page, &mtr) == 0);
/* scan the leaf page and find the number of distinct keys,
when looking only at the first n_prefix columns; also estimate
@@ -1565,6 +1568,7 @@ dict_stats_analyze_index_below_cur(
__func__, page_no, n_diff);
#endif
+ mtr_commit(&mtr);
mem_heap_free(heap);
}
@@ -1774,8 +1778,7 @@ dict_stats_analyze_index_for_n_prefix(
dict_stats_analyze_index_below_cur(btr_pcur_get_btr_cur(&pcur),
n_prefix,
&n_diff_on_leaf_page,
- &n_external_pages,
- mtr);
+ &n_external_pages);
/* We adjust n_diff_on_leaf_page here to avoid counting
one record twice - once as the last on some page and once
diff --git a/storage/innobase/fts/fts0opt.cc b/storage/innobase/fts/fts0opt.cc
index e096b8bf6d6..2a0aa4daf12 100644
--- a/storage/innobase/fts/fts0opt.cc
+++ b/storage/innobase/fts/fts0opt.cc
@@ -580,7 +580,7 @@ fts_zip_read_word(
#ifdef UNIV_DEBUG
ulint i;
#endif
- byte len = 0;
+ short len = 0;
void* null = NULL;
byte* ptr = word->f_str;
int flush = Z_NO_FLUSH;
@@ -590,7 +590,7 @@ fts_zip_read_word(
return(NULL);
}
- zip->zp->next_out = &len;
+ zip->zp->next_out = reinterpret_cast<byte*>(&len);
zip->zp->avail_out = sizeof(len);
while (zip->status == Z_OK && zip->zp->avail_out > 0) {
@@ -688,11 +688,12 @@ fts_fetch_index_words(
fts_zip_t* zip = static_cast<fts_zip_t*>(user_arg);
que_node_t* exp = sel_node->select_list;
dfield_t* dfield = que_node_get_val(exp);
- byte len = (byte) dfield_get_len(dfield);
+ short len = static_cast<short>(dfield_get_len(dfield));
void* data = dfield_get_data(dfield);
/* Skip the duplicate words. */
- if (zip->word.f_len == len && !memcmp(zip->word.f_str, data, len)) {
+ if (zip->word.f_len == static_cast<ulint>(len)
+ && !memcmp(zip->word.f_str, data, len)) {
return(TRUE);
}
@@ -706,7 +707,7 @@ fts_fetch_index_words(
ut_a(zip->zp->next_in == NULL);
/* The string is prefixed by len. */
- zip->zp->next_in = &len;
+ zip->zp->next_in = reinterpret_cast<byte*>(&len);
zip->zp->avail_in = sizeof(len);
/* Compress the word, create output blocks as necessary. */
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index a2088d8fe1b..78812d6283b 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -4,7 +4,7 @@ Copyright (c) 2000, 2015, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, 2009 Google Inc.
Copyright (c) 2009, Percona Inc.
Copyright (c) 2012, Facebook Inc.
-Copyright (c) 2013, 2015, MariaDB Corporation.
+Copyright (c) 2013, 2014 SkySQL Ab. All Rights Reserved.
Portions of this file contain modifications contributed and copyrighted by
Google, Inc. Those modifications are gratefully acknowledged and are described
@@ -33,6 +33,8 @@ this program; if not, write to the Free Software Foundation, Inc.,
*****************************************************************************/
+#define lower_case_file_system lower_case_file_system_server
+#define mysql_unpacked_real_data_home mysql_unpacked_real_data_home_server
#include <sql_table.h> // explain_filename, nz2, EXPLAIN_PARTITIONS_AS_COMMENT,
// EXPLAIN_FILENAME_MAX_EXTRA_LENGTH
@@ -44,6 +46,11 @@ this program; if not, write to the Free Software Foundation, Inc.,
#include <table_cache.h>
#include <my_check_opt.h>
+#undef lower_case_file_system
+#undef mysql_unpacked_real_data_home
+MYSQL_PLUGIN_IMPORT extern my_bool lower_case_file_system;
+MYSQL_PLUGIN_IMPORT extern char mysql_unpacked_real_data_home[];
+
#ifdef _WIN32
#include <io.h>
#endif
@@ -544,6 +551,71 @@ ib_cb_t innodb_api_cb[] = {
(ib_cb_t) ib_trx_read_only
};
+
+/**
+ Test a file path whether it is same as mysql data directory path.
+
+ @param path null terminated character string
+
+ @return
+ @retval TRUE The path is different from mysql data directory.
+ @retval FALSE The path is same as mysql data directory.
+*/
+static bool is_mysql_datadir_path(const char *path)
+{
+ if (path == NULL)
+ return false;
+
+ char mysql_data_dir[FN_REFLEN], path_dir[FN_REFLEN];
+ convert_dirname(path_dir, path, NullS);
+ convert_dirname(mysql_data_dir, mysql_unpacked_real_data_home, NullS);
+ size_t mysql_data_home_len= dirname_length(mysql_data_dir);
+ size_t path_len = dirname_length(path_dir);
+
+ if (path_len < mysql_data_home_len)
+ return true;
+
+ if (!lower_case_file_system)
+ return(memcmp(mysql_data_dir, path_dir, mysql_data_home_len));
+
+ return(files_charset_info->coll->strnncoll(files_charset_info,
+ (uchar *) path_dir, path_len,
+ (uchar *) mysql_data_dir,
+ mysql_data_home_len,
+ TRUE));
+
+}
+
+
+static int mysql_tmpfile_path(const char *path, const char *prefix)
+{
+ DBUG_ASSERT(path != NULL);
+ DBUG_ASSERT((strlen(path) + strlen(prefix)) <= FN_REFLEN);
+
+ char filename[FN_REFLEN];
+ File fd = create_temp_file(filename, path, prefix,
+#ifdef __WIN__
+ O_BINARY | O_TRUNC | O_SEQUENTIAL |
+ O_SHORT_LIVED |
+#endif /* __WIN__ */
+ O_CREAT | O_EXCL | O_RDWR | O_TEMPORARY,
+ MYF(MY_WME));
+ if (fd >= 0) {
+#ifndef __WIN__
+ /*
+ This can be removed once the following bug is fixed:
+ Bug #28903 create_temp_file() doesn't honor O_TEMPORARY option
+ (file not removed) (Unix)
+ */
+ unlink(filename);
+#endif /* !__WIN__ */
+ }
+
+ return fd;
+}
+
+
+
/*************************************************************//**
Check whether valid argument given to innodb_ft_*_stopword_table.
This function is registered as a callback with MySQL.
@@ -559,6 +631,108 @@ innodb_stopword_table_validate(
for update function */
struct st_mysql_value* value); /*!< in: incoming string */
+/** Validate passed-in "value" is a valid directory name.
+This function is registered as a callback with MySQL.
+@param[in,out] thd thread handle
+@param[in] var pointer to system variable
+@param[out] save immediate result for update
+@param[in] value incoming string
+@return 0 for valid name */
+static
+int
+innodb_tmpdir_validate(
+ THD* thd,
+ struct st_mysql_sys_var* var,
+ void* save,
+ struct st_mysql_value* value)
+{
+
+ char* alter_tmp_dir;
+ char* innodb_tmp_dir;
+ char buff[OS_FILE_MAX_PATH];
+ int len = sizeof(buff);
+ char tmp_abs_path[FN_REFLEN + 2];
+
+ ut_ad(save != NULL);
+ ut_ad(value != NULL);
+
+ if (check_global_access(thd, FILE_ACL)) {
+ push_warning_printf(
+ thd, Sql_condition::WARN_LEVEL_WARN,
+ ER_WRONG_ARGUMENTS,
+ "InnoDB: FILE Permissions required");
+ *static_cast<const char**>(save) = NULL;
+ return(1);
+ }
+
+ alter_tmp_dir = (char*) value->val_str(value, buff, &len);
+
+ if (!alter_tmp_dir) {
+ *static_cast<const char**>(save) = alter_tmp_dir;
+ return(0);
+ }
+
+ if (strlen(alter_tmp_dir) > FN_REFLEN) {
+ push_warning_printf(
+ thd, Sql_condition::WARN_LEVEL_WARN,
+ ER_WRONG_ARGUMENTS,
+ "Path length should not exceed %d bytes", FN_REFLEN);
+ *static_cast<const char**>(save) = NULL;
+ return(1);
+ }
+
+ my_realpath(tmp_abs_path, alter_tmp_dir, 0);
+ size_t tmp_abs_len = strlen(tmp_abs_path);
+
+ if (my_access(tmp_abs_path, F_OK)) {
+
+ push_warning_printf(
+ thd, Sql_condition::WARN_LEVEL_WARN,
+ ER_WRONG_ARGUMENTS,
+ "InnoDB: Path doesn't exist.");
+ *static_cast<const char**>(save) = NULL;
+ return(1);
+ } else if (my_access(tmp_abs_path, R_OK | W_OK)) {
+ push_warning_printf(
+ thd, Sql_condition::WARN_LEVEL_WARN,
+ ER_WRONG_ARGUMENTS,
+ "InnoDB: Server doesn't have permission in "
+ "the given location.");
+ *static_cast<const char**>(save) = NULL;
+ return(1);
+ }
+
+ MY_STAT stat_info_dir;
+
+ if (my_stat(tmp_abs_path, &stat_info_dir, MYF(0))) {
+ if ((stat_info_dir.st_mode & S_IFDIR) != S_IFDIR) {
+
+ push_warning_printf(
+ thd, Sql_condition::WARN_LEVEL_WARN,
+ ER_WRONG_ARGUMENTS,
+ "Given path is not a directory. ");
+ *static_cast<const char**>(save) = NULL;
+ return(1);
+ }
+ }
+
+ if (!is_mysql_datadir_path(tmp_abs_path)) {
+
+ push_warning_printf(
+ thd, Sql_condition::WARN_LEVEL_WARN,
+ ER_WRONG_ARGUMENTS,
+ "InnoDB: Path Location should not be same as "
+ "mysql data directory location.");
+ *static_cast<const char**>(save) = NULL;
+ return(1);
+ }
+
+ innodb_tmp_dir = static_cast<char*>(
+ thd_memdup(thd, tmp_abs_path, tmp_abs_len + 1));
+ *static_cast<const char**>(save) = innodb_tmp_dir;
+ return(0);
+}
+
/** "GEN_CLUST_INDEX" is the name reserved for InnoDB default
system clustered index when there is no primary key. */
const char innobase_index_reserve_name[] = "GEN_CLUST_INDEX";
@@ -611,6 +785,11 @@ static MYSQL_THDVAR_STR(ft_user_stopword_table,
"User supplied stopword table name, effective in the session level.",
innodb_stopword_table_validate, NULL, NULL);
+static MYSQL_THDVAR_STR(tmpdir,
+ PLUGIN_VAR_OPCMDARG|PLUGIN_VAR_MEMALLOC,
+ "Directory for temporary non-tablespace files.",
+ innodb_tmpdir_validate, NULL, NULL);
+
static SHOW_VAR innodb_status_variables[]= {
{"buffer_pool_dump_status",
(char*) &export_vars.innodb_buffer_pool_dump_status, SHOW_CHAR},
@@ -686,12 +865,6 @@ static SHOW_VAR innodb_status_variables[]= {
(char*) &export_vars.innodb_os_log_pending_writes, SHOW_LONG},
{"os_log_written",
(char*) &export_vars.innodb_os_log_written, SHOW_LONGLONG},
- {"os_merge_buffers_written",
- (char*) &export_vars.innodb_merge_buffers_written, SHOW_LONGLONG},
- {"os_merge_buffers_read",
- (char*) &export_vars.innodb_merge_buffers_read, SHOW_LONGLONG},
- {"os_merge_buffers_merged",
- (char*) &export_vars.innodb_merge_buffers_merged, SHOW_LONGLONG},
{"page_size",
(char*) &export_vars.innodb_page_size, SHOW_LONG},
{"pages_created",
@@ -1090,7 +1263,6 @@ Normalizes a table name string. A normalized name consists of the
database name catenated to '/' and table name. An example:
test/mytable. On Windows normalization puts both the database name and the
table name always to lower case if "set_lower_case" is set to TRUE. */
-static
void
normalize_table_name_low(
/*=====================*/
@@ -1360,6 +1532,26 @@ thd_supports_xa(
return(THDVAR(thd, support_xa));
}
+/** Get the value of innodb_tmpdir.
+@param[in] thd thread handle, or NULL to query
+ the global innodb_tmpdir.
+@retval NULL if innodb_tmpdir="" */
+UNIV_INTERN
+const char*
+thd_innodb_tmpdir(
+ THD* thd)
+{
+#ifdef UNIV_SYNC_DEBUG
+ ut_ad(!sync_thread_levels_nonempty_trx(false));
+#endif /* UNIV_SYNC_DEBUG */
+
+ const char* tmp_dir = THDVAR(thd, tmpdir);
+ if (tmp_dir != NULL && *tmp_dir == '\0') {
+ tmp_dir = NULL;
+ }
+
+ return(tmp_dir);
+}
/******************************************************************//**
Returns the lock wait timeout for the current connection.
@return the lock wait timeout, in seconds */
@@ -1896,13 +2088,14 @@ innobase_get_lower_case_table_names(void)
return(lower_case_table_names);
}
-/*********************************************************************//**
-Creates a temporary file.
+/** Create a temporary file in the location specified by the parameter
+path. If the path is null, then it will be created in tmpdir.
+@param[in] path location for creating temporary file
@return temporary file descriptor, or < 0 on error */
UNIV_INTERN
int
-innobase_mysql_tmpfile(void)
-/*========================*/
+innobase_mysql_tmpfile(
+ const char* path)
{
#ifdef WITH_INNODB_DISALLOW_WRITES
os_event_wait(srv_allow_writes_event);
@@ -1915,7 +2108,11 @@ innobase_mysql_tmpfile(void)
return(-1);
);
- fd = mysql_tmpfile("ib");
+ if (path == NULL) {
+ fd = mysql_tmpfile("ib");
+ } else {
+ fd = mysql_tmpfile_path(path, "ib");
+ }
if (fd >= 0) {
/* Copy the file descriptor, so that the additional resources
@@ -2842,6 +3039,13 @@ ha_innobase::reset_template(void)
ut_ad(prebuilt->magic_n == ROW_PREBUILT_ALLOCATED);
ut_ad(prebuilt->magic_n2 == prebuilt->magic_n);
+ /* Force table to be freed in close_thread_table(). */
+ DBUG_EXECUTE_IF("free_table_in_fts_query",
+ if (prebuilt->in_fts_query) {
+ table->m_needs_reopen = true;
+ }
+ );
+
prebuilt->keep_other_fields_on_keyread = 0;
prebuilt->read_just_key = 0;
prebuilt->in_fts_query = 0;
@@ -4602,7 +4806,6 @@ Normalizes a table name string. A normalized name consists of the
database name catenated to '/' and table name. Example: test/mytable.
On Windows normalization puts both the database name and the
table name always to lower case if "set_lower_case" is set to TRUE. */
-static
void
normalize_table_name_low(
/*=====================*/
@@ -16989,15 +17192,12 @@ innobase_fts_close_ranking(
{
fts_result_t* result;
- ((NEW_FT_INFO*) fts_hdl)->ft_prebuilt->in_fts_query = false;
-
result = ((NEW_FT_INFO*) fts_hdl)->ft_result;
fts_query_free_result(result);
my_free((uchar*) fts_hdl);
-
return;
}
@@ -18674,6 +18874,7 @@ static struct st_mysql_sys_var* innobase_system_variables[]= {
MYSQL_SYSVAR(sync_array_size),
MYSQL_SYSVAR(compression_failure_threshold_pct),
MYSQL_SYSVAR(compression_pad_pct_max),
+ MYSQL_SYSVAR(simulate_comp_failures),
#ifdef UNIV_DEBUG
MYSQL_SYSVAR(trx_rseg_n_slots_debug),
MYSQL_SYSVAR(limit_optimistic_insert_debug),
@@ -18681,7 +18882,7 @@ static struct st_mysql_sys_var* innobase_system_variables[]= {
MYSQL_SYSVAR(fil_make_page_dirty_debug),
MYSQL_SYSVAR(saved_page_number_debug),
#endif /* UNIV_DEBUG */
- MYSQL_SYSVAR(simulate_comp_failures),
+ MYSQL_SYSVAR(tmpdir),
NULL
};
diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc
index 6358b87a642..e66fc07ff10 100644
--- a/storage/innobase/handler/handler0alter.cc
+++ b/storage/innobase/handler/handler0alter.cc
@@ -204,12 +204,14 @@ innobase_fulltext_exist(
/*******************************************************************//**
Determine if ALTER TABLE needs to rebuild the table.
@param ha_alter_info the DDL operation
+@param altered_table MySQL original table
@return whether it is necessary to rebuild the table */
static __attribute__((nonnull, warn_unused_result))
bool
innobase_need_rebuild(
/*==================*/
- const Alter_inplace_info* ha_alter_info)
+ const Alter_inplace_info* ha_alter_info,
+ const TABLE* altered_table)
{
if (ha_alter_info->handler_flags
== Alter_inplace_info::CHANGE_CREATE_OPTION
@@ -221,6 +223,34 @@ innobase_need_rebuild(
return(false);
}
+ /* If alter table changes column name and adds a new
+ index, we need to check is this new index created
+ to new column name. This is because column name
+ changes are done normally after creating indexes. */
+ if ((ha_alter_info->handler_flags
+ & Alter_inplace_info::ALTER_COLUMN_NAME) &&
+ ((ha_alter_info->handler_flags
+ & Alter_inplace_info::ADD_INDEX) ||
+ (ha_alter_info->handler_flags
+ & Alter_inplace_info::ADD_FOREIGN_KEY))) {
+ for (ulint i = 0; i < ha_alter_info->key_count; i++) {
+ const KEY* key = &ha_alter_info->key_info_buffer[
+ ha_alter_info->index_add_buffer[i]];
+
+ for (ulint j = 0; j < key->user_defined_key_parts; j++) {
+ const KEY_PART_INFO* key_part = &(key->key_part[j]);
+ const Field* field = altered_table->field[key_part->fieldnr];
+
+ /* Field used on added index is renamed on
+ this same alter table. We need table
+ rebuild. */
+ if (field->flags & FIELD_IS_RENAMED) {
+ return (true);
+ }
+ }
+ }
+ }
+
return(!!(ha_alter_info->handler_flags & INNOBASE_ALTER_REBUILD));
}
@@ -535,7 +565,7 @@ ha_innobase::check_if_supported_inplace_alter(
operation is possible. */
} else if (((ha_alter_info->handler_flags
& Alter_inplace_info::ADD_PK_INDEX)
- || innobase_need_rebuild(ha_alter_info))
+ || innobase_need_rebuild(ha_alter_info, table))
&& (innobase_fulltext_exist(altered_table))) {
/* Refuse to rebuild the table online, if
fulltext indexes are to survive the rebuild. */
@@ -1536,7 +1566,8 @@ innobase_create_index_def(
index_def_t* index, /*!< out: index definition */
mem_heap_t* heap, /*!< in: heap where memory
is allocated */
- const Field** fields) /*!z in: MySQL table fields */
+ const Field** fields) /*!< in: MySQL table fields
+ */
{
const KEY* key = &keys[key_number];
ulint i;
@@ -1831,9 +1862,11 @@ innobase_create_key_defs(
bool& add_fts_doc_id,
/*!< in: whether we need to add new DOC ID
column for FTS index */
- bool& add_fts_doc_idx)
+ bool& add_fts_doc_idx,
/*!< in: whether we need to add new DOC ID
index for FTS index */
+ const TABLE* table)
+ /*!< in: MySQL table that is being altered */
{
index_def_t* indexdef;
index_def_t* indexdefs;
@@ -1883,7 +1916,8 @@ innobase_create_key_defs(
}
const bool rebuild = new_primary || add_fts_doc_id
- || innobase_need_rebuild(ha_alter_info);
+ || innobase_need_rebuild(ha_alter_info, table);
+
/* Reserve one more space if new_primary is true, and we might
need to add the FTS_DOC_ID_INDEX */
indexdef = indexdefs = static_cast<index_def_t*>(
@@ -2716,11 +2750,16 @@ prepare_inplace_alter_table_dict(
ctx->num_to_add_index = ha_alter_info->index_add_count;
+ ut_ad(ctx->prebuilt->trx->mysql_thd != NULL);
+ const char* path = thd_innodb_tmpdir(
+ ctx->prebuilt->trx->mysql_thd);
+
index_defs = innobase_create_key_defs(
ctx->heap, ha_alter_info, altered_table, ctx->num_to_add_index,
num_fts_index,
row_table_got_default_clust_index(ctx->new_table),
- fts_doc_id_col, add_fts_doc_id, add_fts_doc_id_idx);
+ fts_doc_id_col, add_fts_doc_id, add_fts_doc_id_idx,
+ old_table);
new_clustered = DICT_CLUSTERED & index_defs[0].ind_type;
@@ -2733,7 +2772,7 @@ prepare_inplace_alter_table_dict(
/* This is not an online operation (LOCK=NONE). */
} else if (ctx->add_autoinc == ULINT_UNDEFINED
&& num_fts_index == 0
- && (!innobase_need_rebuild(ha_alter_info)
+ && (!innobase_need_rebuild(ha_alter_info, old_table)
|| !innobase_fulltext_exist(altered_table))) {
/* InnoDB can perform an online operation (LOCK=NONE). */
} else {
@@ -2750,7 +2789,7 @@ prepare_inplace_alter_table_dict(
is just copied from old table and stored in indexdefs[0] */
DBUG_ASSERT(!add_fts_doc_id || new_clustered);
DBUG_ASSERT(!!new_clustered ==
- (innobase_need_rebuild(ha_alter_info)
+ (innobase_need_rebuild(ha_alter_info, old_table)
|| add_fts_doc_id));
/* Allocate memory for dictionary index definitions */
@@ -3000,7 +3039,7 @@ prepare_inplace_alter_table_dict(
add_cols, ctx->heap);
ctx->add_cols = add_cols;
} else {
- DBUG_ASSERT(!innobase_need_rebuild(ha_alter_info));
+ DBUG_ASSERT(!innobase_need_rebuild(ha_alter_info, old_table));
if (!ctx->new_table->fts
&& innobase_fulltext_exist(altered_table)) {
@@ -3021,7 +3060,7 @@ prepare_inplace_alter_table_dict(
ctx->add_index[a] = row_merge_create_index(
ctx->trx, ctx->new_table,
- &index_defs[a]);
+ &index_defs[a], ctx->col_names);
add_key_nums[a] = index_defs[a].key_number;
@@ -3058,8 +3097,10 @@ prepare_inplace_alter_table_dict(
error = DB_OUT_OF_MEMORY;
goto error_handling;);
rw_lock_x_lock(&ctx->add_index[a]->lock);
+
bool ok = row_log_allocate(ctx->add_index[a],
- NULL, true, NULL, NULL);
+ NULL, true, NULL,
+ NULL, path);
rw_lock_x_unlock(&ctx->add_index[a]->lock);
if (!ok) {
@@ -3085,7 +3126,7 @@ prepare_inplace_alter_table_dict(
clust_index, ctx->new_table,
!(ha_alter_info->handler_flags
& Alter_inplace_info::ADD_PK_INDEX),
- ctx->add_cols, ctx->col_map);
+ ctx->add_cols, ctx->col_map, path);
rw_lock_x_unlock(&clust_index->lock);
if (!ok) {
@@ -3866,7 +3907,7 @@ err_exit:
if (!(ha_alter_info->handler_flags & INNOBASE_ALTER_DATA)
|| (ha_alter_info->handler_flags
== Alter_inplace_info::CHANGE_CREATE_OPTION
- && !innobase_need_rebuild(ha_alter_info))) {
+ && !innobase_need_rebuild(ha_alter_info, table))) {
if (heap) {
ha_alter_info->handler_ctx
@@ -4040,7 +4081,7 @@ ok_exit:
if (ha_alter_info->handler_flags
== Alter_inplace_info::CHANGE_CREATE_OPTION
- && !innobase_need_rebuild(ha_alter_info)) {
+ && !innobase_need_rebuild(ha_alter_info, table)) {
goto ok_exit;
}
@@ -4062,6 +4103,7 @@ ok_exit:
files and merge sort. */
DBUG_EXECUTE_IF("innodb_OOM_inplace_alter",
error = DB_OUT_OF_MEMORY; goto oom;);
+
error = row_merge_build_indexes(
prebuilt->trx,
prebuilt->table, ctx->new_table,
@@ -4740,9 +4782,11 @@ commit_get_autoinc(
Field* autoinc_field =
old_table->found_next_number_field;
+ KEY* autoinc_key =
+ old_table->key_info + old_table->s->next_number_index;
- dict_index_t* index = dict_table_get_index_on_first_col(
- ctx->old_table, autoinc_field->field_index);
+ dict_index_t* index = dict_table_get_index_on_name(
+ ctx->old_table, autoinc_key->name);
max_autoinc = ha_alter_info->create_info->auto_increment_value;
diff --git a/storage/innobase/include/ha_prototypes.h b/storage/innobase/include/ha_prototypes.h
index 753f3dac27e..1a8af4164c1 100644
--- a/storage/innobase/include/ha_prototypes.h
+++ b/storage/innobase/include/ha_prototypes.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 2006, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2006, 2015, Oracle and/or its affiliates. All Rights Reserved.
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
@@ -357,6 +357,15 @@ thd_supports_xa(
THD* thd); /*!< in: thread handle, or NULL to query
the global innodb_supports_xa */
+/** Get status of innodb_tmpdir.
+@param[in] thd thread handle, or NULL to query
+ the global innodb_tmpdir.
+@retval NULL if innodb_tmpdir="" */
+UNIV_INTERN
+const char*
+thd_innodb_tmpdir(
+ THD* thd);
+
/******************************************************************//**
Returns the lock wait timeout for the current connection.
@return the lock wait timeout, in seconds */
@@ -641,4 +650,18 @@ ib_push_warning(
const char *format,/*!< in: warning message */
...);
+/*****************************************************************//**
+Normalizes a table name string. A normalized name consists of the
+database name catenated to '/' and table name. An example:
+test/mytable. On Windows normalization puts both the database name and the
+table name always to lower case if "set_lower_case" is set to TRUE. */
+void
+normalize_table_name_low(
+/*=====================*/
+ char* norm_name, /*!< out: normalized name as a
+ null-terminated string */
+ const char* name, /*!< in: table name string */
+ ibool set_lower_case); /*!< in: TRUE if we want to set
+ name to lower case */
+
#endif /* HA_INNODB_PROTOTYPES_H */
diff --git a/storage/innobase/include/os0file.h b/storage/innobase/include/os0file.h
index 5077c9e37eb..6eea39639dc 100644
--- a/storage/innobase/include/os0file.h
+++ b/storage/innobase/include/os0file.h
@@ -432,14 +432,19 @@ UNIV_INTERN
void
os_io_init_simple(void);
/*===================*/
-/***********************************************************************//**
-Creates a temporary file. This function is like tmpfile(3), but
-the temporary file is created in the MySQL temporary directory.
-@return temporary file handle, or NULL on error */
+
+/** Create a temporary file. This function is like tmpfile(3), but
+the temporary file is created in the given parameter path. If the path
+is null then it will create the file in the mysql server configuration
+parameter (--tmpdir).
+@param[in] path location for creating temporary file
+@return temporary file handle, or NULL on error */
+UNIV_INTERN
FILE*
-os_file_create_tmpfile(void);
-/*========================*/
+os_file_create_tmpfile(
+ const char* path);
+
#endif /* !UNIV_HOTBACKUP */
/***********************************************************************//**
The os_file_opendir() function opens a directory stream corresponding to the
@@ -1245,14 +1250,14 @@ os_file_get_status(
file can be opened in RW mode */
#if !defined(UNIV_HOTBACKUP)
-/*********************************************************************//**
-Creates a temporary file that will be deleted on close.
-This function is defined in ha_innodb.cc.
-@return temporary file descriptor, or < 0 on error */
+/** Create a temporary file in the location specified by the parameter
+path. If the path is null, then it will be created in tmpdir.
+@param[in] path location for creating temporary file
+@return temporary file descriptor, or < 0 on error */
UNIV_INTERN
int
-innobase_mysql_tmpfile(void);
-/*========================*/
+innobase_mysql_tmpfile(
+ const char* path);
#endif /* !UNIV_HOTBACKUP */
diff --git a/storage/innobase/include/os0sync.h b/storage/innobase/include/os0sync.h
index 8e4b4f41aae..e192a3a6c94 100644
--- a/storage/innobase/include/os0sync.h
+++ b/storage/innobase/include/os0sync.h
@@ -487,7 +487,7 @@ os_atomic_clear(volatile lock_word_t* ptr)
__atomic_clear(ptr, __ATOMIC_RELEASE);
}
-# elif defined(IB_STRONG_MEMORY_MODEL)
+# elif defined(HAVE_ATOMIC_BUILTINS)
/** Do an atomic test and set.
@param[in,out] ptr Memory location to set to non-zero
diff --git a/storage/innobase/include/row0log.h b/storage/innobase/include/row0log.h
index 62715fe8808..5eed390aced 100644
--- a/storage/innobase/include/row0log.h
+++ b/storage/innobase/include/row0log.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 2011, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2011, 2015, Oracle and/or its affiliates. All Rights Reserved.
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
@@ -51,8 +51,9 @@ row_log_allocate(
const dtuple_t* add_cols,
/*!< in: default values of
added columns, or NULL */
- const ulint* col_map)/*!< in: mapping of old column
+ const ulint* col_map,/*!< in: mapping of old column
numbers to new ones, or NULL if !table */
+ const char* path) /*!< in: where to create temporary file */
__attribute__((nonnull(1), warn_unused_result));
/******************************************************//**
diff --git a/storage/innobase/include/row0merge.h b/storage/innobase/include/row0merge.h
index de353d46202..8ce65ccd696 100644
--- a/storage/innobase/include/row0merge.h
+++ b/storage/innobase/include/row0merge.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 2005, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2005, 2015, Oracle and/or its affiliates. All Rights Reserved.
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
@@ -171,14 +171,14 @@ void
row_merge_drop_temp_indexes(void);
/*=============================*/
-/*********************************************************************//**
-Creates temporary merge files, and if UNIV_PFS_IO defined, register
-the file descriptor with Performance Schema.
+/** Create temporary merge files in the given paramater path, and if
+UNIV_PFS_IO defined, register the file descriptor with Performance Schema.
+@param[in] path location for creating temporary merge files.
@return File descriptor */
UNIV_INTERN
int
-row_merge_file_create_low(void)
-/*===========================*/
+row_merge_file_create_low(
+ const char* path)
__attribute__((warn_unused_result));
/*********************************************************************//**
Destroy a merge file. And de-register the file from Performance Schema
@@ -252,8 +252,11 @@ row_merge_create_index(
/*===================*/
trx_t* trx, /*!< in/out: trx (sets error_state) */
dict_table_t* table, /*!< in: the index is on this table */
- const index_def_t* index_def);
+ const index_def_t* index_def,
/*!< in: the index definition */
+ const char** col_names);
+ /*! in: column names if columns are
+ renamed or NULL */
/*********************************************************************//**
Check if a transaction can use an index.
@return TRUE if index can be used by the transaction else FALSE */
@@ -349,15 +352,17 @@ row_merge_buf_empty(
/*================*/
row_merge_buf_t* buf) /*!< in,own: sort buffer */
__attribute__((warn_unused_result, nonnull));
-/*********************************************************************//**
-Create a merge file.
+
+/** Create a merge file in the given location.
+@param[out] merge_file merge file structure
+@param[in] path location for creating temporary file
@return file descriptor, or -1 on failure */
UNIV_INTERN
int
row_merge_file_create(
-/*==================*/
- merge_file_t* merge_file) /*!< out: merge file structure */
- __attribute__((nonnull));
+ merge_file_t* merge_file,
+ const char* path);
+
/*********************************************************************//**
Merge disk files.
@return DB_SUCCESS or error code */
diff --git a/storage/innobase/include/srv0mon.h b/storage/innobase/include/srv0mon.h
index d2b65721e1a..2d90f47eefe 100644
--- a/storage/innobase/include/srv0mon.h
+++ b/storage/innobase/include/srv0mon.h
@@ -2,7 +2,6 @@
Copyright (c) 2010, 2013, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2012, Facebook Inc.
-Copyright (c) 2014, 2015, MariaDB Corporation.
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
@@ -256,9 +255,6 @@ enum monitor_id_t {
MONITOR_OVLD_OS_LOG_FSYNC,
MONITOR_OVLD_OS_LOG_PENDING_FSYNC,
MONITOR_OVLD_OS_LOG_PENDING_WRITES,
- MONITOR_MERGE_BLOCKS_WRITTEN,
- MONITOR_MERGE_BLOCKS_READ,
- MONITOR_MERGE_BLOCKS_MERGED,
/* Transaction related counters */
MONITOR_MODULE_TRX,
diff --git a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h
index 9910c753203..c03524f53ca 100644
--- a/storage/innobase/include/srv0srv.h
+++ b/storage/innobase/include/srv0srv.h
@@ -3,7 +3,7 @@
Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2008, 2009, Google Inc.
Copyright (c) 2009, Percona Inc.
-Copyright (c) 2013, 2015, MariaDB Corporation.
+Copyright (c) 2013, 2014, SkySQL Ab. All Rights Reserved.
Portions of this file contain modifications contributed and copyrighted by
Google, Inc. Those modifications are gratefully acknowledged and are described
@@ -138,15 +138,6 @@ struct srv_stats_t {
/** Number of system rows inserted */
ulint_ctr_64_t n_system_rows_inserted;
-
- /** Number of merge buffers written */
- ulint_ctr_64_t merge_buffers_written;
-
- /** Number of merge buffers read */
- ulint_ctr_64_t merge_buffers_read;
-
- /** Number of merge buffers merged */
- ulint_ctr_64_t merge_buffers_merged;
};
extern const char* srv_main_thread_op_info;
@@ -890,9 +881,6 @@ struct export_var_t{
ulint innodb_purge_view_trx_id_age; /*!< rw_max_trx_id
- purged view's min trx_id */
#endif /* UNIV_DEBUG */
- ib_int64_t innodb_merge_buffers_written;
- ib_int64_t innodb_merge_buffers_read;
- ib_int64_t innodb_merge_buffers_merged;
};
/** Thread slot in the thread table. */
diff --git a/storage/innobase/include/univ.i b/storage/innobase/include/univ.i
index 3f737089ac3..8347425c5c0 100644
--- a/storage/innobase/include/univ.i
+++ b/storage/innobase/include/univ.i
@@ -44,7 +44,7 @@ Created 1/20/1994 Heikki Tuuri
#define INNODB_VERSION_MAJOR 5
#define INNODB_VERSION_MINOR 6
-#define INNODB_VERSION_BUGFIX 27
+#define INNODB_VERSION_BUGFIX 29
/* The following is the InnoDB version as shown in
SELECT plugin_version FROM information_schema.plugins;
diff --git a/storage/innobase/lock/lock0lock.cc b/storage/innobase/lock/lock0lock.cc
index 5543bbddd54..b700d24c199 100644
--- a/storage/innobase/lock/lock0lock.cc
+++ b/storage/innobase/lock/lock0lock.cc
@@ -642,7 +642,7 @@ lock_sys_create(
lock_sys->rec_hash = hash_create(n_cells);
if (!srv_read_only_mode) {
- lock_latest_err_file = os_file_create_tmpfile();
+ lock_latest_err_file = os_file_create_tmpfile(NULL);
ut_a(lock_latest_err_file);
}
}
diff --git a/storage/innobase/os/os0file.cc b/storage/innobase/os/os0file.cc
index 32e6548c516..a1a7e91bb2f 100644
--- a/storage/innobase/os/os0file.cc
+++ b/storage/innobase/os/os0file.cc
@@ -762,19 +762,20 @@ os_io_init_simple(void)
}
}
-/***********************************************************************//**
-Creates a temporary file. This function is like tmpfile(3), but
-the temporary file is created in the MySQL temporary directory.
-@return temporary file handle, or NULL on error */
+/** Create a temporary file. This function is like tmpfile(3), but
+the temporary file is created in the given parameter path. If the path
+is null then it will create the file in the mysql server configuration
+parameter (--tmpdir).
+@param[in] path location for creating temporary file
+@return temporary file handle, or NULL on error */
UNIV_INTERN
FILE*
-os_file_create_tmpfile(void)
-/*========================*/
+os_file_create_tmpfile(
+ const char* path)
{
FILE* file = NULL;
- int fd;
WAIT_ALLOW_WRITES();
- fd = innobase_mysql_tmpfile();
+ int fd = innobase_mysql_tmpfile(path);
ut_ad(!srv_read_only_mode);
@@ -3679,7 +3680,7 @@ os_aio_native_aio_supported(void)
return(FALSE);
} else if (!srv_read_only_mode) {
/* Now check if tmpdir supports native aio ops. */
- fd = innobase_mysql_tmpfile();
+ fd = innobase_mysql_tmpfile(NULL);
if (fd < 0) {
ib_logf(IB_LOG_LEVEL_WARN,
diff --git a/storage/innobase/row/row0ftsort.cc b/storage/innobase/row/row0ftsort.cc
index 621a14d27c2..d8d35319d48 100644
--- a/storage/innobase/row/row0ftsort.cc
+++ b/storage/innobase/row/row0ftsort.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 2010, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2010, 2015, Oracle and/or its affiliates. All Rights Reserved.
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
@@ -220,6 +220,9 @@ row_fts_psort_info_init(
common_info->merge_event = os_event_create();
common_info->opt_doc_id_size = opt_doc_id_size;
+ ut_ad(trx->mysql_thd != NULL);
+ const char* path = thd_innodb_tmpdir(trx->mysql_thd);
+
/* There will be FTS_NUM_AUX_INDEX number of "sort buckets" for
each parallel sort thread. Each "sort bucket" holds records for
a particular "FTS index partition" */
@@ -241,8 +244,8 @@ row_fts_psort_info_init(
psort_info[j].merge_buf[i] = row_merge_buf_create(
dup->index);
- if (row_merge_file_create(psort_info[j].merge_file[i])
- < 0) {
+ if (row_merge_file_create(psort_info[j].merge_file[i],
+ path) < 0) {
goto func_exit;
}
@@ -610,6 +613,11 @@ fts_parallel_tokenization(
ulint retried = 0;
dberr_t error = DB_SUCCESS;
+ ut_ad(psort_info->psort_common->trx->mysql_thd != NULL);
+
+ const char* path = thd_innodb_tmpdir(
+ psort_info->psort_common->trx->mysql_thd);
+
ut_ad(psort_info);
buf = psort_info->merge_buf;
@@ -840,7 +848,7 @@ exit:
continue;
}
- tmpfd[i] = row_merge_file_create_low();
+ tmpfd[i] = row_merge_file_create_low(path);
if (tmpfd[i] < 0) {
error = DB_OUT_OF_MEMORY;
goto func_exit;
diff --git a/storage/innobase/row/row0log.cc b/storage/innobase/row/row0log.cc
index 032a3a0619c..8d592968c3e 100644
--- a/storage/innobase/row/row0log.cc
+++ b/storage/innobase/row/row0log.cc
@@ -194,8 +194,25 @@ struct row_log_t {
or by index->lock X-latch only */
row_log_buf_t head; /*!< reader context; protected by MDL only;
modifiable by row_log_apply_ops() */
+ const char* path; /*!< where to create temporary file during
+ log operation */
};
+/** Create the file or online log if it does not exist.
+@param[in,out] log online rebuild log
+@return file descriptor. */
+static __attribute__((warn_unused_result))
+int
+row_log_tmpfile(
+ row_log_t* log)
+{
+ DBUG_ENTER("row_log_tmpfile");
+ if (log->fd < 0) {
+ log->fd = row_merge_file_create_low(log->path);
+ }
+
+ DBUG_RETURN(log->fd);
+}
/** Allocate the memory for the log buffer.
@param[in,out] log_buf Buffer used for log operation
@@ -340,6 +357,12 @@ row_log_online_op(
log->tail.buf, avail_size);
}
UNIV_MEM_ASSERT_RW(log->tail.block, srv_sort_buf_size);
+
+ if (row_log_tmpfile(log) < 0) {
+ log->error = DB_OUT_OF_MEMORY;
+ goto err_exit;
+ }
+
ret = os_file_write(
"(modification log)",
OS_FILE_FROM_FD(log->fd),
@@ -450,6 +473,12 @@ row_log_table_close_func(
log->tail.buf, avail);
}
UNIV_MEM_ASSERT_RW(log->tail.block, srv_sort_buf_size);
+
+ if (row_log_tmpfile(log) < 0) {
+ log->error = DB_OUT_OF_MEMORY;
+ goto err_exit;
+ }
+
ret = os_file_write(
"(modification log)",
OS_FILE_FROM_FD(log->fd),
@@ -469,6 +498,7 @@ write_failed:
log->tail.total += size;
UNIV_MEM_INVALID(log->tail.buf, sizeof log->tail.buf);
+err_exit:
mutex_exit(&log->mutex);
}
@@ -2536,7 +2566,8 @@ corruption:
if (index->online_log->head.blocks) {
#ifdef HAVE_FTRUNCATE
/* Truncate the file in order to save space. */
- if (ftruncate(index->online_log->fd, 0) == -1) {
+ if (index->online_log->fd != -1
+ && ftruncate(index->online_log->fd, 0) == -1) {
fprintf(stderr, "InnoDB: Error: Truncate of file "
"\'%s\' failed with error %d:%s\n",
index->name + 1, errno, strerror(errno));
@@ -2855,8 +2886,9 @@ row_log_allocate(
const dtuple_t* add_cols,
/*!< in: default values of
added columns, or NULL */
- const ulint* col_map)/*!< in: mapping of old column
+ const ulint* col_map,/*!< in: mapping of old column
numbers to new ones, or NULL if !table */
+ const char* path) /*!< in: where to create temporary file */
{
row_log_t* log;
DBUG_ENTER("row_log_allocate");
@@ -2875,11 +2907,7 @@ row_log_allocate(
DBUG_RETURN(false);
}
- log->fd = row_merge_file_create_low();
- if (log->fd < 0) {
- ut_free(log);
- DBUG_RETURN(false);
- }
+ log->fd = -1;
mutex_create(index_online_log_key, &log->mutex,
SYNC_INDEX_ONLINE_LOG);
log->blobs = NULL;
@@ -2894,6 +2922,7 @@ row_log_allocate(
log->tail.block = log->head.block = NULL;
log->head.blocks = log->head.bytes = 0;
log->head.total = 0;
+ log->path = path;
dict_index_set_online_status(index, ONLINE_INDEX_CREATION);
index->online_log = log;
@@ -3371,7 +3400,8 @@ corruption:
if (index->online_log->head.blocks) {
#ifdef HAVE_FTRUNCATE
/* Truncate the file in order to save space. */
- if (ftruncate(index->online_log->fd, 0) == -1) {
+ if (index->online_log->fd != -1
+ && ftruncate(index->online_log->fd, 0) == -1) {
fprintf(stderr, "InnoDB: Error: Truncate of file "
"\'%s\' failed with error %d:%s\n",
index->name + 1, errno, strerror(errno));
diff --git a/storage/innobase/row/row0merge.cc b/storage/innobase/row/row0merge.cc
index 36635c6d035..74978a680af 100644
--- a/storage/innobase/row/row0merge.cc
+++ b/storage/innobase/row/row0merge.cc
@@ -1,7 +1,6 @@
/*****************************************************************************
Copyright (c) 2005, 2015, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2014, 2015, MariaDB Corporation.
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
@@ -872,8 +871,6 @@ row_merge_read(
success = os_file_read_no_error_handling(OS_FILE_FROM_FD(fd), buf,
ofs, srv_sort_buf_size);
- srv_stats.merge_buffers_read.inc();
-
#ifdef POSIX_FADV_DONTNEED
/* Each block is read exactly once. Free up the file cache. */
posix_fadvise(fd, ofs, srv_sort_buf_size, POSIX_FADV_DONTNEED);
@@ -908,7 +905,6 @@ row_merge_write(
DBUG_EXECUTE_IF("row_merge_write_failure", return(FALSE););
ret = os_file_write("(merge)", OS_FILE_FROM_FD(fd), buf, ofs, buf_len);
- srv_stats.merge_buffers_written.inc();
#ifdef UNIV_DEBUG
if (row_merge_print_block_write) {
@@ -1245,47 +1241,95 @@ row_merge_write_eof(
return(&block[0]);
}
-/********************************************************************//**
-Reads clustered index of the table and create temporary files
+/** Create a temporary file if it has not been created already.
+@param[in,out] tmpfd temporary file handle
+@param[in] path path to create temporary file
+@return file descriptor, or -1 on failure */
+static __attribute__((warn_unused_result))
+int
+row_merge_tmpfile_if_needed(
+ int* tmpfd,
+ const char* path)
+{
+ if (*tmpfd < 0) {
+ *tmpfd = row_merge_file_create_low(path);
+ }
+
+ return(*tmpfd);
+}
+
+/** Create a temporary file for merge sort if it was not created already.
+@param[in,out] file merge file structure
+@param[in,out] tmpfd temporary file structure
+@param[in] nrec number of records in the file
+@param[in] path path to create temporary files
+@return file descriptor, or -1 on failure */
+static __attribute__((warn_unused_result))
+int
+row_merge_file_create_if_needed(
+ merge_file_t* file,
+ int* tmpfd,
+ ulint nrec,
+ const char* path)
+{
+ ut_ad(file->fd < 0 || *tmpfd >=0);
+ if (file->fd < 0 && row_merge_file_create(file, path) >= 0) {
+ if (row_merge_tmpfile_if_needed(tmpfd, path) < 0) {
+ return(-1);
+ }
+
+ file->n_rec = nrec;
+ }
+
+ ut_ad(file->fd < 0 || *tmpfd >=0);
+ return(file->fd);
+}
+
+/** Reads clustered index of the table and create temporary files
containing the index entries for the indexes to be built.
-@return DB_SUCCESS or error */
+@param[in] trx transaction
+@param[in,out] table MySQL table object, for reporting erroneous
+ records
+@param[in] old_table table where rows are read from
+@param[in] new_table table where indexes are created; identical to
+ old_table unless creating a PRIMARY KEY
+@param[in] online true if creating indexes online
+@param[in] index indexes to be created
+@param[in] fts_sort_idx full-text index to be created, or NULL
+@param[in] psort_info parallel sort info for fts_sort_idx creation,
+ or NULL
+@param[in] files temporary files
+@param[in] key_numbers MySQL key numbers to create
+@param[in] n_index number of indexes to create
+@param[in] add_cols default values of added columns, or NULL
+@param[in] col_map mapping of old column numbers to new ones, or
+ NULL if old_table == new_table
+@param[in] add_autoinc number of added AUTO_INCREMENT columns, or
+ ULINT_UNDEFINED if none is added
+@param[in,out] sequence autoinc sequence
+@param[in,out] block file buffer
+@param[in,out] tmpfd temporary file handle
+return DB_SUCCESS or error */
static __attribute__((nonnull(1,2,3,4,6,9,10,16), warn_unused_result))
dberr_t
row_merge_read_clustered_index(
-/*===========================*/
- trx_t* trx, /*!< in: transaction */
- struct TABLE* table, /*!< in/out: MySQL table object,
- for reporting erroneous records */
- const dict_table_t* old_table,/*!< in: table where rows are
- read from */
- const dict_table_t* new_table,/*!< in: table where indexes are
- created; identical to old_table
- unless creating a PRIMARY KEY */
- bool online, /*!< in: true if creating indexes
- online */
- dict_index_t** index, /*!< in: indexes to be created */
+ trx_t* trx,
+ struct TABLE* table,
+ const dict_table_t* old_table,
+ const dict_table_t* new_table,
+ bool online,
+ dict_index_t** index,
dict_index_t* fts_sort_idx,
- /*!< in: full-text index to be created,
- or NULL */
fts_psort_t* psort_info,
- /*!< in: parallel sort info for
- fts_sort_idx creation, or NULL */
- merge_file_t* files, /*!< in: temporary files */
+ merge_file_t* files,
const ulint* key_numbers,
- /*!< in: MySQL key numbers to create */
- ulint n_index,/*!< in: number of indexes to create */
+ ulint n_index,
const dtuple_t* add_cols,
- /*!< in: default values of
- added columns, or NULL */
- const ulint* col_map,/*!< in: mapping of old column
- numbers to new ones, or NULL
- if old_table == new_table */
+ const ulint* col_map,
ulint add_autoinc,
- /*!< in: number of added
- AUTO_INCREMENT column, or
- ULINT_UNDEFINED if none is added */
- ib_sequence_t& sequence,/*!< in/out: autoinc sequence */
- row_merge_block_t* block) /*!< in/out: file buffer */
+ ib_sequence_t& sequence,
+ row_merge_block_t* block,
+ int* tmpfd)
{
dict_index_t* clust_index; /* Clustered index */
mem_heap_t* row_heap; /* Heap memory to create
@@ -1317,6 +1361,9 @@ row_merge_read_clustered_index(
DEBUG_FTS_SORT_PRINT("FTS_SORT: Start Create Index\n");
#endif
+ ut_ad(trx->mysql_thd != NULL);
+ const char* path = thd_innodb_tmpdir(trx->mysql_thd);
+
/* Create and initialize memory for record buffers */
merge_buf = static_cast<row_merge_buf_t**>(
@@ -1740,7 +1787,7 @@ write_buffers:
/* We have enough data tuples to form a block.
Sort them and write to disk. */
- if (UNIV_LIKELY(buf->n_tuples)) {
+ if (buf->n_tuples) {
if (dict_index_is_unique(buf->index)) {
row_merge_dup_t dup = {
buf->index, table, col_map, 0};
@@ -1781,13 +1828,21 @@ write_buffers:
dict_index_get_lock(buf->index));
}
- /* Do not write empty buffers to temporary file */
- if (buf->n_tuples) {
+ if (buf->n_tuples > 0) {
+
+ if (row_merge_file_create_if_needed(
+ file, tmpfd, buf->n_tuples, path) < 0) {
+ err = DB_OUT_OF_MEMORY;
+ trx->error_key_num = i;
+ break;
+ }
+
+ ut_ad(file->n_rec > 0);
row_merge_buf_write(buf, file, block);
if (!row_merge_write(file->fd, file->offset++,
- block)) {
+ block)) {
err = DB_TEMP_FILE_WRITE_FAILURE;
trx->error_key_num = i;
break;
@@ -1835,6 +1890,7 @@ write_buffers:
func_exit:
mtr_commit(&mtr);
+
mem_heap_free(row_heap);
if (nonnull) {
@@ -2076,9 +2132,6 @@ done1:
mem_heap_free(heap);
b2 = row_merge_write_eof(&block[2 * srv_sort_buf_size],
b2, of->fd, &of->offset);
-
- srv_stats.merge_buffers_merged.inc();
-
return(b2 ? DB_SUCCESS : DB_CORRUPTION);
}
@@ -3068,14 +3121,15 @@ row_merge_drop_temp_indexes(void)
trx_free_for_background(trx);
}
-/*********************************************************************//**
-Creates temporary merge files, and if UNIV_PFS_IO defined, register
-the file descriptor with Performance Schema.
-@return file descriptor, or -1 on failure */
+
+/** Create temporary merge files in the given paramater path, and if
+UNIV_PFS_IO defined, register the file descriptor with Performance Schema.
+@param[in] path location for creating temporary merge files.
+@return File descriptor */
UNIV_INTERN
int
-row_merge_file_create_low(void)
-/*===========================*/
+row_merge_file_create_low(
+ const char* path)
{
int fd;
#ifdef UNIV_PFS_IO
@@ -3089,7 +3143,7 @@ row_merge_file_create_low(void)
"Innodb Merge Temp File",
__FILE__, __LINE__);
#endif
- fd = innobase_mysql_tmpfile();
+ fd = innobase_mysql_tmpfile(path);
#ifdef UNIV_PFS_IO
register_pfs_file_open_end(locker, fd);
#endif
@@ -3102,16 +3156,18 @@ row_merge_file_create_low(void)
return(fd);
}
-/*********************************************************************//**
-Create a merge file.
+
+/** Create a merge file in the given location.
+@param[out] merge_file merge file structure
+@param[in] path location for creating temporary file
@return file descriptor, or -1 on failure */
UNIV_INTERN
int
row_merge_file_create(
-/*==================*/
- merge_file_t* merge_file) /*!< out: merge file structure */
+ merge_file_t* merge_file,
+ const char* path)
{
- merge_file->fd = row_merge_file_create_low();
+ merge_file->fd = row_merge_file_create_low(path);
merge_file->offset = 0;
merge_file->n_rec = 0;
@@ -3461,8 +3517,11 @@ row_merge_create_index(
/*===================*/
trx_t* trx, /*!< in/out: trx (sets error_state) */
dict_table_t* table, /*!< in: the index is on this table */
- const index_def_t* index_def)
+ const index_def_t* index_def,
/*!< in: the index definition */
+ const char** col_names)
+ /*! in: column names if columns are
+ renamed or NULL */
{
dict_index_t* index;
dberr_t err;
@@ -3482,9 +3541,24 @@ row_merge_create_index(
for (i = 0; i < n_fields; i++) {
index_field_t* ifield = &index_def->fields[i];
- const char * col_name = ifield->col_name ?
- dict_table_get_col_name_for_mysql(table, ifield->col_name) :
- dict_table_get_col_name(table, ifield->col_no);
+ const char * col_name;
+
+ /*
+ Alter table renaming a column and then adding a index
+ to this new name e.g ALTER TABLE t
+ CHANGE COLUMN b c INT NOT NULL, ADD UNIQUE INDEX (c);
+ requires additional check as column names are not yet
+ changed when new index definitions are created. Table's
+ new column names are on a array of column name pointers
+ if any of the column names are changed. */
+
+ if (col_names && col_names[i]) {
+ col_name = col_names[i];
+ } else {
+ col_name = ifield->col_name ?
+ dict_table_get_col_name_for_mysql(table, ifield->col_name) :
+ dict_table_get_col_name(table, ifield->col_no);
+ }
dict_mem_index_add_field(
index,
@@ -3631,10 +3705,6 @@ row_merge_build_indexes(
}
for (i = 0; i < n_indexes; i++) {
- if (row_merge_file_create(&merge_files[i]) < 0) {
- error = DB_OUT_OF_MEMORY;
- goto func_exit;
- }
if (indexes[i]->type & DICT_FTS) {
ibool opt_doc_id_size = FALSE;
@@ -3663,13 +3733,6 @@ row_merge_build_indexes(
}
}
- tmpfd = row_merge_file_create_low();
-
- if (tmpfd < 0) {
- error = DB_OUT_OF_MEMORY;
- goto func_exit;
- }
-
/* Reset the MySQL row buffer that is used when reporting
duplicate keys. */
innobase_rec_reset(table);
@@ -3681,7 +3744,7 @@ row_merge_build_indexes(
trx, table, old_table, new_table, online, indexes,
fts_sort_idx, psort_info, merge_files, key_numbers,
n_indexes, add_cols, col_map,
- add_autoinc, sequence, block);
+ add_autoinc, sequence, block, &tmpfd);
if (error != DB_SUCCESS) {
@@ -3762,22 +3825,18 @@ wait_again:
#ifdef FTS_INTERNAL_DIAG_PRINT
DEBUG_FTS_SORT_PRINT("FTS_SORT: Complete Insert\n");
#endif
- } else {
- /* Sorting and inserting is required only if
- there really is records */
- if (UNIV_LIKELY(merge_files[i].n_rec)) {
- row_merge_dup_t dup = {
- sort_idx, table, col_map, 0};
-
- error = row_merge_sort(
- trx, &dup, &merge_files[i],
- block, &tmpfd);
-
- if (error == DB_SUCCESS) {
- error = row_merge_insert_index_tuples(
- trx->id, sort_idx, old_table,
- merge_files[i].fd, block);
- }
+ } else if (merge_files[i].fd != -1) {
+ row_merge_dup_t dup = {
+ sort_idx, table, col_map, 0};
+
+ error = row_merge_sort(
+ trx, &dup, &merge_files[i],
+ block, &tmpfd);
+
+ if (error == DB_SUCCESS) {
+ error = row_merge_insert_index_tuples(
+ trx->id, sort_idx, old_table,
+ merge_files[i].fd, block);
}
}
diff --git a/storage/innobase/row/row0mysql.cc b/storage/innobase/row/row0mysql.cc
index db82973ba5a..05287d2f230 100644
--- a/storage/innobase/row/row0mysql.cc
+++ b/storage/innobase/row/row0mysql.cc
@@ -4793,6 +4793,7 @@ row_rename_table_for_mysql(
pars_info_t* info = NULL;
int retry;
bool aux_fts_rename = false;
+ char* is_part = NULL;
ut_a(old_name != NULL);
ut_a(new_name != NULL);
@@ -4830,6 +4831,55 @@ row_rename_table_for_mysql(
table = dict_table_open_on_name(old_name, dict_locked, FALSE,
DICT_ERR_IGNORE_NONE);
+ /* We look for pattern #P# to see if the table is partitioned
+ MySQL table. */
+#ifdef __WIN__
+ is_part = strstr((char *)old_name, (char *)"#p#");
+#else
+ is_part = strstr((char *)old_name, (char *)"#P#");
+#endif /* __WIN__ */
+
+ /* MySQL partition engine hard codes the file name
+ separator as "#P#". The text case is fixed even if
+ lower_case_table_names is set to 1 or 2. This is true
+ for sub-partition names as well. InnoDB always
+ normalises file names to lower case on Windows, this
+ can potentially cause problems when copying/moving
+ tables between platforms.
+
+ 1) If boot against an installation from Windows
+ platform, then its partition table name could
+ be all be in lower case in system tables. So we
+ will need to check lower case name when load table.
+
+ 2) If we boot an installation from other case
+ sensitive platform in Windows, we might need to
+ check the existence of table name without lowering
+ case them in the system table. */
+ if (!table &&
+ is_part &&
+ innobase_get_lower_case_table_names() == 1) {
+ char par_case_name[MAX_FULL_NAME_LEN + 1];
+#ifndef __WIN__
+ /* Check for the table using lower
+ case name, including the partition
+ separator "P" */
+ memcpy(par_case_name, old_name,
+ strlen(old_name));
+ par_case_name[strlen(old_name)] = 0;
+ innobase_casedn_str(par_case_name);
+#else
+ /* On Windows platfrom, check
+ whether there exists table name in
+ system table whose name is
+ not being normalized to lower case */
+ normalize_table_name_low(
+ par_case_name, old_name, FALSE);
+#endif
+ table = dict_table_open_on_name(par_case_name, dict_locked, FALSE,
+ DICT_ERR_IGNORE_NONE);
+ }
+
if (!table) {
err = DB_TABLE_NOT_FOUND;
ut_print_timestamp(stderr);
diff --git a/storage/innobase/srv/srv0mon.cc b/storage/innobase/srv/srv0mon.cc
index 960c889f871..a0dd32c203f 100644
--- a/storage/innobase/srv/srv0mon.cc
+++ b/storage/innobase/srv/srv0mon.cc
@@ -2,7 +2,6 @@
Copyright (c) 2010, 2014, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2012, Facebook Inc.
-Copyright (c) 2014, 2015, MariaDB Corporation.
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
@@ -675,24 +674,6 @@ static monitor_info_t innodb_counter_info[] =
MONITOR_EXISTING | MONITOR_DEFAULT_ON),
MONITOR_DEFAULT_START, MONITOR_OVLD_OS_LOG_PENDING_WRITES},
- {"os_merge_blocks_written", "os",
- "Number of merge blocks written (innodb_os_merge_blocks_written)",
- static_cast<monitor_type_t>(
- MONITOR_EXISTING | MONITOR_DEFAULT_ON),
- MONITOR_DEFAULT_START, MONITOR_MERGE_BLOCKS_WRITTEN},
-
- {"os_merge_blocks_read", "os",
- "Number of merge blocks read (innodb_os_merge_blocks_read)",
- static_cast<monitor_type_t>(
- MONITOR_EXISTING | MONITOR_DEFAULT_ON),
- MONITOR_DEFAULT_START, MONITOR_MERGE_BLOCKS_READ},
-
- {"os_merge_blocks_merged", "os",
- "Number of merge blocks merged (innodb_os_merge_blocks_merged)",
- static_cast<monitor_type_t>(
- MONITOR_EXISTING | MONITOR_DEFAULT_ON),
- MONITOR_DEFAULT_START, MONITOR_MERGE_BLOCKS_MERGED},
-
/* ========== Counters for Transaction Module ========== */
{"module_trx", "transaction", "Transaction Manager",
MONITOR_MODULE,
@@ -1645,21 +1626,6 @@ srv_mon_process_existing_counter(
update_min = TRUE;
break;
- /* innodb_os_merge_blocks_written */
- case MONITOR_MERGE_BLOCKS_WRITTEN:
- value = srv_stats.merge_buffers_written;
- break;
-
- /* innodb_os_merge_blocks_read */
- case MONITOR_MERGE_BLOCKS_READ:
- value = srv_stats.merge_buffers_read;
- break;
-
- /* innodb_os_merge_blocks_merged */
- case MONITOR_MERGE_BLOCKS_MERGED:
- value = srv_stats.merge_buffers_merged;
- break;
-
/* innodb_log_waits */
case MONITOR_OVLD_LOG_WAITS:
value = srv_stats.log_waits;
diff --git a/storage/innobase/srv/srv0srv.cc b/storage/innobase/srv/srv0srv.cc
index 69763c1b2ae..d9688701c74 100644
--- a/storage/innobase/srv/srv0srv.cc
+++ b/storage/innobase/srv/srv0srv.cc
@@ -1,9 +1,9 @@
/*****************************************************************************
-Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, 2009 Google Inc.
Copyright (c) 2009, Percona Inc.
-Copyright (c) 2013, 2015, MariaDB Corporation.
+Copyright (c) 2013, 2014, SkySQL Ab. All Rights Reserved.
Portions of this file contain modifications contributed and copyrighted by
Google, Inc. Those modifications are gratefully acknowledged and are described
@@ -1569,10 +1569,6 @@ srv_export_innodb_status(void)
}
#endif /* UNIV_DEBUG */
- export_vars.innodb_merge_buffers_written = srv_stats.merge_buffers_written;
- export_vars.innodb_merge_buffers_read = srv_stats.merge_buffers_read;
- export_vars.innodb_merge_buffers_merged = srv_stats.merge_buffers_merged;
-
mutex_exit(&srv_innodb_monitor_mutex);
}
@@ -1753,6 +1749,8 @@ exit_func:
/*********************************************************************//**
A thread which prints warnings about semaphore waits which have lasted
too long. These can be used to track bugs which cause hangs.
+Note: In order to make sync_arr_wake_threads_if_sema_free work as expected,
+we should avoid waiting any mutexes in this function!
@return a dummy parameter */
extern "C" UNIV_INTERN
os_thread_ret_t
@@ -1792,23 +1790,21 @@ loop:
/* Try to track a strange bug reported by Harald Fuchs and others,
where the lsn seems to decrease at times */
- /* We have to use nowait to ensure we don't block */
- new_lsn= log_get_lsn_nowait();
-
- if (new_lsn && new_lsn < old_lsn) {
- ut_print_timestamp(stderr);
- fprintf(stderr,
- " InnoDB: Error: old log sequence number " LSN_PF
- " was greater\n"
- "InnoDB: than the new log sequence number " LSN_PF "!\n"
- "InnoDB: Please submit a bug report"
- " to http://bugs.mysql.com\n",
- old_lsn, new_lsn);
- ut_ad(0);
- }
+ if (log_peek_lsn(&new_lsn)) {
+ if (new_lsn < old_lsn) {
+ ut_print_timestamp(stderr);
+ fprintf(stderr,
+ " InnoDB: Error: old log sequence number " LSN_PF
+ " was greater\n"
+ "InnoDB: than the new log sequence number " LSN_PF "!\n"
+ "InnoDB: Please submit a bug report"
+ " to http://bugs.mysql.com\n",
+ old_lsn, new_lsn);
+ ut_ad(0);
+ }
- if (new_lsn)
old_lsn = new_lsn;
+ }
if (difftime(time(NULL), srv_last_monitor_time) > 60) {
/* We referesh InnoDB Monitor values so that averages are
diff --git a/storage/innobase/srv/srv0start.cc b/storage/innobase/srv/srv0start.cc
index 71dc33d342e..e8f9e945ab4 100644
--- a/storage/innobase/srv/srv0start.cc
+++ b/storage/innobase/srv/srv0start.cc
@@ -1898,7 +1898,7 @@ innobase_start_or_create_for_mysql(void)
}
} else {
srv_monitor_file_name = NULL;
- srv_monitor_file = os_file_create_tmpfile();
+ srv_monitor_file = os_file_create_tmpfile(NULL);
if (!srv_monitor_file) {
return(DB_ERROR);
@@ -1908,7 +1908,7 @@ innobase_start_or_create_for_mysql(void)
mutex_create(srv_dict_tmpfile_mutex_key,
&srv_dict_tmpfile_mutex, SYNC_DICT_OPERATION);
- srv_dict_tmpfile = os_file_create_tmpfile();
+ srv_dict_tmpfile = os_file_create_tmpfile(NULL);
if (!srv_dict_tmpfile) {
return(DB_ERROR);
@@ -1917,7 +1917,7 @@ innobase_start_or_create_for_mysql(void)
mutex_create(srv_misc_tmpfile_mutex_key,
&srv_misc_tmpfile_mutex, SYNC_ANY_LATCH);
- srv_misc_tmpfile = os_file_create_tmpfile();
+ srv_misc_tmpfile = os_file_create_tmpfile(NULL);
if (!srv_misc_tmpfile) {
return(DB_ERROR);
diff --git a/storage/perfschema/CMakeLists.txt b/storage/perfschema/CMakeLists.txt
index 3b3ffae6357..fe3b5ec985a 100644
--- a/storage/perfschema/CMakeLists.txt
+++ b/storage/perfschema/CMakeLists.txt
@@ -17,7 +17,7 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/sql
${PCRE_INCLUDES}
- ${CMAKE_SOURCE_DIR}/extra/yassl/include)
+ ${SSL_INCLUDE_DIRS})
ADD_DEFINITIONS(-DMYSQL_SERVER)
diff --git a/storage/perfschema/ha_perfschema.cc b/storage/perfschema/ha_perfschema.cc
index 21a5262a2f1..6c69594b91a 100644
--- a/storage/perfschema/ha_perfschema.cc
+++ b/storage/perfschema/ha_perfschema.cc
@@ -205,7 +205,7 @@ maria_declare_plugin(perfschema)
0x0001,
pfs_status_vars,
NULL,
- "5.6.27",
+ "5.6.29",
MariaDB_PLUGIN_MATURITY_STABLE
}
maria_declare_plugin_end;
diff --git a/storage/perfschema/table_session_connect.cc b/storage/perfschema/table_session_connect.cc
index df3337b284c..a8cf199b651 100644
--- a/storage/perfschema/table_session_connect.cc
+++ b/storage/perfschema/table_session_connect.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
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
@@ -251,7 +251,8 @@ void table_session_connect::make_row(PFS_thread *pfs, uint ordinal)
&m_row.m_attr_value_length))
{
/* we don't expect internal threads to have connection attributes */
- DBUG_ASSERT(pfs->m_processlist_id != 0);
+ if (pfs->m_processlist_id == 0)
+ return;
m_row.m_ordinal_position= ordinal;
m_row.m_process_id= pfs->m_processlist_id;
diff --git a/storage/sphinx/ha_sphinx.cc b/storage/sphinx/ha_sphinx.cc
index a54930ec331..ff3b63465eb 100644
--- a/storage/sphinx/ha_sphinx.cc
+++ b/storage/sphinx/ha_sphinx.cc
@@ -634,8 +634,10 @@ protected:
void SendFloat ( float v ) { SendDword ( sphF2DW(v) ); }
};
+#ifdef HAVE_EXPLICIT_TEMPLATE_INSTANTIATION
template int CSphSEQuery::ParseArray<uint32> ( uint32 **, const char * );
template int CSphSEQuery::ParseArray<longlong> ( longlong **, const char * );
+#endif
//////////////////////////////////////////////////////////////////////////////
diff --git a/storage/spider/spd_conn.cc b/storage/spider/spd_conn.cc
index 293a209ac68..c5c47064403 100644
--- a/storage/spider/spd_conn.cc
+++ b/storage/spider/spd_conn.cc
@@ -2280,9 +2280,6 @@ void *spider_bg_conn_action(
if (!(trx = spider_get_trx(thd, FALSE, &error_num)))
{
delete thd;
-#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100000
- set_current_thd(NULL);
-#endif
pthread_mutex_lock(&conn->bg_conn_sync_mutex);
pthread_cond_signal(&conn->bg_conn_sync_cond);
pthread_mutex_unlock(&conn->bg_conn_sync_mutex);
@@ -2346,9 +2343,6 @@ void *spider_bg_conn_action(
spider_free_trx(trx, TRUE);
/* lex_end(thd->lex); */
delete thd;
-#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100000
- set_current_thd(NULL);
-#endif
pthread_mutex_lock(&conn->bg_conn_sync_mutex);
pthread_cond_signal(&conn->bg_conn_sync_cond);
pthread_mutex_unlock(&conn->bg_conn_mutex);
@@ -2799,9 +2793,6 @@ void *spider_bg_sts_action(
if (!(trx = spider_get_trx(thd, FALSE, &error_num)))
{
delete thd;
-#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100000
- set_current_thd(NULL);
-#endif
share->bg_sts_thd_wait = FALSE;
share->bg_sts_kill = FALSE;
share->bg_sts_init = FALSE;
@@ -2867,9 +2858,6 @@ void *spider_bg_sts_action(
}
spider_free_trx(trx, TRUE);
delete thd;
-#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100000
- set_current_thd(NULL);
-#endif
share->bg_sts_thd_wait = FALSE;
share->bg_sts_kill = FALSE;
share->bg_sts_init = FALSE;
@@ -2903,9 +2891,6 @@ void *spider_bg_sts_action(
}
spider_free_trx(trx, TRUE);
delete thd;
-#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100000
- set_current_thd(NULL);
-#endif
pthread_cond_signal(&share->bg_sts_sync_cond);
pthread_mutex_unlock(&share->sts_mutex);
#if !defined(MYSQL_DYNAMIC_PLUGIN) || !defined(_WIN32)
@@ -3190,9 +3175,6 @@ void *spider_bg_crd_action(
if (!(trx = spider_get_trx(thd, FALSE, &error_num)))
{
delete thd;
-#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100000
- set_current_thd(NULL);
-#endif
share->bg_crd_thd_wait = FALSE;
share->bg_crd_kill = FALSE;
share->bg_crd_init = FALSE;
@@ -3262,9 +3244,6 @@ void *spider_bg_crd_action(
}
spider_free_trx(trx, TRUE);
delete thd;
-#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100000
- set_current_thd(NULL);
-#endif
share->bg_crd_thd_wait = FALSE;
share->bg_crd_kill = FALSE;
share->bg_crd_init = FALSE;
@@ -3298,9 +3277,6 @@ void *spider_bg_crd_action(
}
spider_free_trx(trx, TRUE);
delete thd;
-#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100000
- set_current_thd(NULL);
-#endif
pthread_cond_signal(&share->bg_crd_sync_cond);
pthread_mutex_unlock(&share->crd_mutex);
#if !defined(MYSQL_DYNAMIC_PLUGIN) || !defined(_WIN32)
@@ -3688,9 +3664,6 @@ void *spider_bg_mon_action(
if (!(trx = spider_get_trx(thd, FALSE, &error_num)))
{
delete thd;
-#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100000
- set_current_thd(NULL);
-#endif
share->bg_mon_kill = FALSE;
share->bg_mon_init = FALSE;
pthread_cond_signal(&share->bg_mon_conds[link_idx]);
@@ -3734,9 +3707,6 @@ void *spider_bg_mon_action(
pthread_mutex_unlock(&share->bg_mon_mutexes[link_idx]);
spider_free_trx(trx, TRUE);
delete thd;
-#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100000
- set_current_thd(NULL);
-#endif
#if !defined(MYSQL_DYNAMIC_PLUGIN) || !defined(_WIN32)
my_pthread_setspecific_ptr(THR_THD, NULL);
#endif
diff --git a/storage/tokudb/CMakeLists.txt b/storage/tokudb/CMakeLists.txt
index d1f43d71f57..aa08120267d 100644
--- a/storage/tokudb/CMakeLists.txt
+++ b/storage/tokudb/CMakeLists.txt
@@ -1,19 +1,15 @@
SET(TOKUDB_VERSION 5.6.26-74.0)
# PerconaFT only supports x86-64 and cmake-2.8.9+
-IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND
- NOT CMAKE_VERSION VERSION_LESS "2.8.9")
+IF(CMAKE_VERSION VERSION_LESS "2.8.9")
+ MESSAGE(STATUS "CMake 2.8.9 or higher is required by TokuDB")
+ELSEIF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR
+ CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64")
CHECK_CXX_SOURCE_COMPILES(
"
struct a {int b; int c; };
struct a d = { .b=1, .c=2 };
int main() { return 0; }
" TOKUDB_OK)
-ELSE()
- IF(NOT CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
- MESSAGE(WARNING "Not Intel 64 bit CPU")
- ELSE()
- MESSAGE(WARNING "Too old CMAKE VERSION. 2.8.9 or higher is required by TokuDB")
- ENDIF()
ENDIF()
IF(NOT TOKUDB_OK OR WITHOUT_TOKUDB OR WITHOUT_TOKUDB_STORAGE_ENGINE)
diff --git a/storage/tokudb/PerconaFT/util/dmt.h b/storage/tokudb/PerconaFT/util/dmt.h
index bba540d8321..71cde8814ab 100644
--- a/storage/tokudb/PerconaFT/util/dmt.h
+++ b/storage/tokudb/PerconaFT/util/dmt.h
@@ -627,16 +627,16 @@ private:
__attribute__((nonnull))
void rebalance(subtree *const subtree);
- __attribute__((nonnull))
+ __attribute__((nonnull(3)))
static void copyout(uint32_t *const outlen, dmtdata_t *const out, const dmt_node *const n);
- __attribute__((nonnull))
+ __attribute__((nonnull(3)))
static void copyout(uint32_t *const outlen, dmtdata_t **const out, dmt_node *const n);
- __attribute__((nonnull))
+ __attribute__((nonnull(4)))
static void copyout(uint32_t *const outlen, dmtdata_t *const out, const uint32_t len, const dmtdata_t *const stored_value_ptr);
- __attribute__((nonnull))
+ __attribute__((nonnull(4)))
static void copyout(uint32_t *const outlen, dmtdata_t **const out, const uint32_t len, dmtdata_t *const stored_value_ptr);
template<typename dmtcmp_t,
diff --git a/storage/tokudb/ha_tokudb.cc b/storage/tokudb/ha_tokudb.cc
index 2cb878491b2..b3e46a02099 100644
--- a/storage/tokudb/ha_tokudb.cc
+++ b/storage/tokudb/ha_tokudb.cc
@@ -320,7 +320,7 @@ static int free_share(TOKUDB_SHARE * share) {
}
const char *ha_tokudb::table_type() const {
- extern const char * const tokudb_hton_name;
+ extern const char *tokudb_hton_name;
return tokudb_hton_name;
}
diff --git a/storage/tokudb/mysql-test/tokudb/t/change_column_bin.py b/storage/tokudb/mysql-test/tokudb/t/change_column_bin.py
index 0ddee301d1b..b94a80ec7be 100644
--- a/storage/tokudb/mysql-test/tokudb/t/change_column_bin.py
+++ b/storage/tokudb/mysql-test/tokudb/t/change_column_bin.py
@@ -24,6 +24,7 @@ def gen_test(n):
def main():
print "# this test is generated by change_bin.py"
print "# test binary expansion is hot"
+ print "--source include/big_test.inc"
print "--disable_warnings"
print "DROP TABLE IF EXISTS t,ti;"
print "--enable_warnings"
diff --git a/storage/tokudb/mysql-test/tokudb/t/change_column_bin.test b/storage/tokudb/mysql-test/tokudb/t/change_column_bin.test
index 0365c155302..6053a263cf0 100644
--- a/storage/tokudb/mysql-test/tokudb/t/change_column_bin.test
+++ b/storage/tokudb/mysql-test/tokudb/t/change_column_bin.test
@@ -1,6 +1,7 @@
source include/have_tokudb.inc;
# this test is generated by change_bin.py
# test binary expansion is hot
+--source include/big_test.inc
--disable_warnings
DROP TABLE IF EXISTS t,ti;
--enable_warnings
diff --git a/storage/tokudb/mysql-test/tokudb/t/change_column_char.py b/storage/tokudb/mysql-test/tokudb/t/change_column_char.py
index 99d99d1c017..7481d9092f2 100644
--- a/storage/tokudb/mysql-test/tokudb/t/change_column_char.py
+++ b/storage/tokudb/mysql-test/tokudb/t/change_column_char.py
@@ -24,6 +24,7 @@ def gen_test(n):
def main():
print "# this test is generated by change_char.py"
print "# test char expansion"
+ print "--source include/big_test.inc"
print "--disable_warnings"
print "DROP TABLE IF EXISTS t,ti;"
print "--enable_warnings"
diff --git a/storage/tokudb/mysql-test/tokudb/t/change_column_char.test b/storage/tokudb/mysql-test/tokudb/t/change_column_char.test
index 8a0b0a9abd8..977420ad07e 100644
--- a/storage/tokudb/mysql-test/tokudb/t/change_column_char.test
+++ b/storage/tokudb/mysql-test/tokudb/t/change_column_char.test
@@ -1,6 +1,7 @@
source include/have_tokudb.inc;
# this test is generated by change_char.py
# test char expansion
+--source include/big_test.inc
--disable_warnings
DROP TABLE IF EXISTS t,ti;
--enable_warnings
diff --git a/storage/xtradb/btr/btr0btr.cc b/storage/xtradb/btr/btr0btr.cc
index d240188e772..a38e6873c73 100644
--- a/storage/xtradb/btr/btr0btr.cc
+++ b/storage/xtradb/btr/btr0btr.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1994, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 2015, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2012, Facebook Inc.
This program is free software; you can redistribute it and/or modify it under
@@ -2143,7 +2143,7 @@ the tuple. It is assumed that mtr contains an x-latch on the tree.
NOTE that the operation of this function must always succeed,
we cannot reverse it: therefore enough free disk space must be
guaranteed to be available before this function is called.
-@return inserted record */
+@return inserted record or NULL if run out of space */
UNIV_INTERN
rec_t*
btr_root_raise_and_insert(
@@ -2204,6 +2204,11 @@ btr_root_raise_and_insert(
level = btr_page_get_level(root, mtr);
new_block = btr_page_alloc(index, 0, FSP_NO_DIR, level, mtr, mtr);
+
+ if (new_block == NULL && os_has_said_disk_full) {
+ return(NULL);
+ }
+
new_page = buf_block_get_frame(new_block);
new_page_zip = buf_block_get_page_zip(new_block);
ut_a(!new_page_zip == !root_page_zip);
@@ -2980,7 +2985,7 @@ function must always succeed, we cannot reverse it: therefore enough
free disk space (2 pages) must be guaranteed to be available before
this function is called.
-@return inserted record */
+@return inserted record or NULL if run out of space */
UNIV_INTERN
rec_t*
btr_page_split_and_insert(
@@ -3094,9 +3099,18 @@ func_start:
}
}
+ DBUG_EXECUTE_IF("disk_is_full",
+ os_has_said_disk_full = true;
+ return(NULL););
+
/* 2. Allocate a new page to the index */
new_block = btr_page_alloc(cursor->index, hint_page_no, direction,
btr_page_get_level(page, mtr), mtr, mtr);
+
+ if (new_block == NULL && os_has_said_disk_full) {
+ return(NULL);
+ }
+
new_page = buf_block_get_frame(new_block);
new_page_zip = buf_block_get_page_zip(new_block);
btr_page_create(new_block, new_page_zip, cursor->index,
diff --git a/storage/xtradb/btr/btr0cur.cc b/storage/xtradb/btr/btr0cur.cc
index d0f65c42974..696948edcee 100644
--- a/storage/xtradb/btr/btr0cur.cc
+++ b/storage/xtradb/btr/btr0cur.cc
@@ -1733,6 +1733,10 @@ btr_cur_pessimistic_insert(
flags, cursor, offsets, heap, entry, n_ext, mtr);
}
+ if (*rec == NULL && os_has_said_disk_full) {
+ return(DB_OUT_OF_FILE_SPACE);
+ }
+
ut_ad(page_rec_get_next(btr_cur_get_rec(cursor)) == *rec);
if (!(flags & BTR_NO_LOCKING_FLAG)) {
diff --git a/storage/xtradb/buf/buf0flu.cc b/storage/xtradb/buf/buf0flu.cc
index c0686cf844f..9c53dc70a78 100644
--- a/storage/xtradb/buf/buf0flu.cc
+++ b/storage/xtradb/buf/buf0flu.cc
@@ -2202,7 +2202,7 @@ Clears up tail of the LRU lists:
* Flush dirty pages at the tail of LRU to the disk
The depth to which we scan each buffer pool is controlled by dynamic
config parameter innodb_LRU_scan_depth.
-@return total pages flushed */
+@return number of pages flushed */
UNIV_INTERN
ulint
buf_flush_LRU_tail(void)
@@ -2306,7 +2306,6 @@ buf_flush_LRU_tail(void)
MONITOR_LRU_BATCH_PAGES,
total_flushed);
}
-
return(total_flushed);
}
@@ -2610,19 +2609,24 @@ static
void
page_cleaner_adapt_lru_sleep_time(
/*==============================*/
- ulint* lru_sleep_time) /*!< in/out: desired page cleaner thread sleep
+ ulint* lru_sleep_time, /*!< in/out: desired page cleaner thread sleep
time for LRU flushes */
+ ulint lru_n_flushed) /*!< in: number of flushed in previous batch */
+
{
ulint free_len = buf_get_total_free_list_length();
ulint max_free_len = srv_LRU_scan_depth * srv_buf_pool_instances;
- if (free_len < max_free_len / 100) {
+ if (free_len < max_free_len / 100 && lru_n_flushed) {
- /* Free lists filled less than 1%, no sleep */
+ /* Free lists filled less than 1%
+ and iteration was able to flush, no sleep */
*lru_sleep_time = 0;
- } else if (free_len > max_free_len / 5) {
+ } else if (free_len > max_free_len / 5
+ || (free_len < max_free_len / 100 && lru_n_flushed == 0)) {
- /* Free lists filled more than 20%, sleep a bit more */
+ /* Free lists filled more than 20%
+ or no pages flushed in previous batch, sleep a bit more */
*lru_sleep_time += 50;
if (*lru_sleep_time > srv_cleaner_max_lru_time)
*lru_sleep_time = srv_cleaner_max_lru_time;
@@ -2825,6 +2829,7 @@ DECLARE_THREAD(buf_flush_lru_manager_thread)(
{
ulint next_loop_time = ut_time_ms() + 1000;
ulint lru_sleep_time = srv_cleaner_max_lru_time;
+ ulint lru_n_flushed = 1;
#ifdef UNIV_PFS_THREAD
pfs_register_thread(buf_lru_manager_thread_key);
@@ -2851,11 +2856,11 @@ DECLARE_THREAD(buf_flush_lru_manager_thread)(
page_cleaner_sleep_if_needed(next_loop_time);
- page_cleaner_adapt_lru_sleep_time(&lru_sleep_time);
+ page_cleaner_adapt_lru_sleep_time(&lru_sleep_time, lru_n_flushed);
next_loop_time = ut_time_ms() + lru_sleep_time;
- buf_flush_LRU_tail();
+ lru_n_flushed = buf_flush_LRU_tail();
}
buf_lru_manager_is_active = false;
diff --git a/storage/xtradb/dict/dict0dict.cc b/storage/xtradb/dict/dict0dict.cc
index a6b107563a8..7e2d95d499b 100644
--- a/storage/xtradb/dict/dict0dict.cc
+++ b/storage/xtradb/dict/dict0dict.cc
@@ -1630,10 +1630,13 @@ dict_table_rename_in_cache(
to preserve the original table name
in constraints which reference it */
{
+ dberr_t err;
dict_foreign_t* foreign;
dict_index_t* index;
ulint fold;
char old_name[MAX_FULL_NAME_LEN + 1];
+ os_file_type_t ftype;
+ ibool exists;
ut_ad(mutex_own(&(dict_sys->mutex)));
@@ -1671,8 +1674,6 @@ dict_table_rename_in_cache(
.ibd file and rebuild the .isl file if needed. */
if (dict_table_is_discarded(table)) {
- os_file_type_t type;
- ibool exists;
char* filepath;
ut_ad(table->space != TRX_SYS_SPACE);
@@ -1691,7 +1692,7 @@ dict_table_rename_in_cache(
fil_delete_tablespace(table->space, BUF_REMOVE_ALL_NO_WRITE);
/* Delete any temp file hanging around. */
- if (os_file_status(filepath, &exists, &type)
+ if (os_file_status(filepath, &exists, &ftype)
&& exists
&& !os_file_delete_if_exists(innodb_file_temp_key,
filepath)) {
@@ -1703,8 +1704,6 @@ dict_table_rename_in_cache(
mem_free(filepath);
} else if (table->space != TRX_SYS_SPACE) {
- char* new_path = NULL;
-
if (DICT_TF2_FLAG_IS_SET(table, DICT_TF2_TEMPORARY)) {
ut_print_timestamp(stderr);
fputs(" InnoDB: Error: trying to rename a"
@@ -1718,34 +1717,43 @@ dict_table_rename_in_cache(
}
return(DB_ERROR);
+ }
- } else if (DICT_TF_HAS_DATA_DIR(table->flags)) {
- char* old_path;
-
- old_path = fil_space_get_first_path(table->space);
+ char* new_path = NULL;
+ char* old_path = fil_space_get_first_path(table->space);
+ if (DICT_TF_HAS_DATA_DIR(table->flags)) {
new_path = os_file_make_new_pathname(
old_path, new_name);
- mem_free(old_path);
-
- dberr_t err = fil_create_link_file(
- new_name, new_path);
-
+ err = fil_create_link_file(new_name, new_path);
if (err != DB_SUCCESS) {
mem_free(new_path);
+ mem_free(old_path);
return(DB_TABLESPACE_EXISTS);
}
+ } else {
+ new_path = fil_make_ibd_name(new_name, false);
+ }
+
+ /* New filepath must not exist. */
+ err = fil_rename_tablespace_check(
+ table->space, old_path, new_path, false);
+ if (err != DB_SUCCESS) {
+ mem_free(old_path);
+ mem_free(new_path);
+ return(err);
}
ibool success = fil_rename_tablespace(
old_name, table->space, new_name, new_path);
+ mem_free(old_path);
+ mem_free(new_path);
+
/* If the tablespace is remote, a new .isl file was created
If success, delete the old one. If not, delete the new one. */
- if (new_path) {
-
- mem_free(new_path);
+ if (DICT_TF_HAS_DATA_DIR(table->flags)) {
fil_delete_link_file(success ? old_name : new_name);
}
diff --git a/storage/xtradb/fil/fil0fil.cc b/storage/xtradb/fil/fil0fil.cc
index b05fc603c24..bbef1afcda6 100644
--- a/storage/xtradb/fil/fil0fil.cc
+++ b/storage/xtradb/fil/fil0fil.cc
@@ -2858,6 +2858,48 @@ fil_make_isl_name(
return(filename);
}
+/** Test if a tablespace file can be renamed to a new filepath by checking
+if that the old filepath exists and the new filepath does not exist.
+@param[in] space_id tablespace id
+@param[in] old_path old filepath
+@param[in] new_path new filepath
+@param[in] is_discarded whether the tablespace is discarded
+@return innodb error code */
+dberr_t
+fil_rename_tablespace_check(
+ ulint space_id,
+ const char* old_path,
+ const char* new_path,
+ bool is_discarded)
+{
+ ulint exists = false;
+ os_file_type_t ftype;
+
+ if (!is_discarded
+ && os_file_status(old_path, &exists, &ftype)
+ && !exists) {
+ ib_logf(IB_LOG_LEVEL_ERROR,
+ "Cannot rename '%s' to '%s' for space ID %lu"
+ " because the source file does not exist.",
+ old_path, new_path, space_id);
+
+ return(DB_TABLESPACE_NOT_FOUND);
+ }
+
+ exists = false;
+ if (!os_file_status(new_path, &exists, &ftype) || exists) {
+ ib_logf(IB_LOG_LEVEL_ERROR,
+ "Cannot rename '%s' to '%s' for space ID %lu"
+ " because the target file exists."
+ " Remove the target file and try again.",
+ old_path, new_path, space_id);
+
+ return(DB_TABLESPACE_EXISTS);
+ }
+
+ return(DB_SUCCESS);
+}
+
/*******************************************************************//**
Renames a single-table tablespace. The tablespace must be cached in the
tablespace memory cache.
@@ -6480,31 +6522,110 @@ fil_get_space_names(
return(err);
}
-/****************************************************************//**
-Generate redo logs for swapping two .ibd files */
+/** Generate redo log for swapping two .ibd files
+@param[in] old_table old table
+@param[in] new_table new table
+@param[in] tmp_name temporary table name
+@param[in,out] mtr mini-transaction
+@return innodb error code */
UNIV_INTERN
-void
+dberr_t
fil_mtr_rename_log(
-/*===============*/
- ulint old_space_id, /*!< in: tablespace id of the old
- table. */
- const char* old_name, /*!< in: old table name */
- ulint new_space_id, /*!< in: tablespace id of the new
- table */
- const char* new_name, /*!< in: new table name */
- const char* tmp_name, /*!< in: temp table name used while
- swapping */
- mtr_t* mtr) /*!< in/out: mini-transaction */
+ const dict_table_t* old_table,
+ const dict_table_t* new_table,
+ const char* tmp_name,
+ mtr_t* mtr)
{
- if (old_space_id != TRX_SYS_SPACE) {
- fil_op_write_log(MLOG_FILE_RENAME, old_space_id,
- 0, 0, old_name, tmp_name, mtr);
+ dberr_t err = DB_SUCCESS;
+ char* old_path;
+
+ /* If neither table is file-per-table,
+ there will be no renaming of files. */
+ if (old_table->space == TRX_SYS_SPACE
+ && new_table->space == TRX_SYS_SPACE) {
+ return(DB_SUCCESS);
+ }
+
+ if (DICT_TF_HAS_DATA_DIR(old_table->flags)) {
+ old_path = os_file_make_remote_pathname(
+ old_table->data_dir_path, old_table->name, "ibd");
+ } else {
+ old_path = fil_make_ibd_name(old_table->name, false);
+ }
+ if (old_path == NULL) {
+ return(DB_OUT_OF_MEMORY);
+ }
+
+ if (old_table->space != TRX_SYS_SPACE) {
+ char* tmp_path;
+
+ if (DICT_TF_HAS_DATA_DIR(old_table->flags)) {
+ tmp_path = os_file_make_remote_pathname(
+ old_table->data_dir_path, tmp_name, "ibd");
+ }
+ else {
+ tmp_path = fil_make_ibd_name(tmp_name, false);
+ }
+
+ if (tmp_path == NULL) {
+ mem_free(old_path);
+ return(DB_OUT_OF_MEMORY);
+ }
+
+ /* Temp filepath must not exist. */
+ err = fil_rename_tablespace_check(
+ old_table->space, old_path, tmp_path,
+ dict_table_is_discarded(old_table));
+ mem_free(tmp_path);
+ if (err != DB_SUCCESS) {
+ mem_free(old_path);
+ return(err);
+ }
+
+ fil_op_write_log(MLOG_FILE_RENAME, old_table->space,
+ 0, 0, old_table->name, tmp_name, mtr);
}
- if (new_space_id != TRX_SYS_SPACE) {
- fil_op_write_log(MLOG_FILE_RENAME, new_space_id,
- 0, 0, new_name, old_name, mtr);
+ if (new_table->space != TRX_SYS_SPACE) {
+
+ /* Destination filepath must not exist unless this ALTER
+ TABLE starts and ends with a file_per-table tablespace. */
+ if (old_table->space == TRX_SYS_SPACE) {
+ char* new_path = NULL;
+
+ if (DICT_TF_HAS_DATA_DIR(new_table->flags)) {
+ new_path = os_file_make_remote_pathname(
+ new_table->data_dir_path,
+ new_table->name, "ibd");
+ }
+ else {
+ new_path = fil_make_ibd_name(
+ new_table->name, false);
+ }
+
+ if (new_path == NULL) {
+ mem_free(old_path);
+ return(DB_OUT_OF_MEMORY);
+ }
+
+ err = fil_rename_tablespace_check(
+ new_table->space, new_path, old_path,
+ dict_table_is_discarded(new_table));
+ mem_free(new_path);
+ if (err != DB_SUCCESS) {
+ mem_free(old_path);
+ return(err);
+ }
+ }
+
+ fil_op_write_log(MLOG_FILE_RENAME, new_table->space,
+ 0, 0, new_table->name, old_table->name, mtr);
+
}
+
+ mem_free(old_path);
+
+ return(err);
}
/*************************************************************************
diff --git a/storage/xtradb/fsp/fsp0fsp.cc b/storage/xtradb/fsp/fsp0fsp.cc
index ef27e688a3f..95d5583de92 100644
--- a/storage/xtradb/fsp/fsp0fsp.cc
+++ b/storage/xtradb/fsp/fsp0fsp.cc
@@ -955,10 +955,20 @@ fsp_try_extend_data_file(
}
} else {
/* We extend single-table tablespaces first one extent
- at a time, but for bigger tablespaces more. It is not
- enough to extend always by one extent, because some
- extents are frag page extents. */
+ at a time, but 4 at a time for bigger tablespaces. It is
+ not enough to extend always by one extent, because we need
+ to add at least one extent to FSP_FREE.
+ A single extent descriptor page will track many extents.
+ And the extent that uses its extent descriptor page is
+ put onto the FSP_FREE_FRAG list. Extents that do not
+ use their extent descriptor page are added to FSP_FREE.
+ The physical page size is used to determine how many
+ extents are tracked on one extent descriptor page. */
ulint extent_size; /*!< one megabyte, in pages */
+ ulint threshold; /*!< The size of the tablespace
+ (in number of pages) where we
+ start allocating more than one
+ extent at a time. */
if (!zip_size) {
extent_size = FSP_EXTENT_SIZE;
@@ -967,6 +977,14 @@ fsp_try_extend_data_file(
* UNIV_PAGE_SIZE / zip_size;
}
+ /* Threshold is set at 32mb except when the page
+ size is small enough that it must be done sooner.
+ For page size less than 4k, we may reach the
+ extent contains extent descriptor page before
+ 32 mb. */
+ threshold = ut_min((32 * extent_size),
+ (zip_size ? zip_size : UNIV_PAGE_SIZE));
+
if (size < extent_size) {
/* Let us first extend the file to extent_size */
success = fsp_try_extend_data_file_with_pages(
@@ -983,7 +1001,7 @@ fsp_try_extend_data_file(
size = extent_size;
}
- if (size < 32 * extent_size) {
+ if (size < threshold) {
size_increase = extent_size;
} else {
/* Below in fsp_fill_free_list() we assume
diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc
index 634e9a1c6a8..5e67e3e3e5d 100644
--- a/storage/xtradb/handler/ha_innodb.cc
+++ b/storage/xtradb/handler/ha_innodb.cc
@@ -4,7 +4,7 @@ Copyright (c) 2000, 2015, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, 2009 Google Inc.
Copyright (c) 2009, Percona Inc.
Copyright (c) 2012, Facebook Inc.
-Copyright (c) 2013, 2015, MariaDB Corporation.
+Copyright (c) 2013, 2014 SkySQL Ab. All Rights Reserved.
Portions of this file contain modifications contributed and copyrighted by
Google, Inc. Those modifications are gratefully acknowledged and are described
@@ -865,12 +865,6 @@ static SHOW_VAR innodb_status_variables[]= {
(char*) &export_vars.innodb_os_log_pending_writes, SHOW_LONG},
{"os_log_written",
(char*) &export_vars.innodb_os_log_written, SHOW_LONGLONG},
- {"os_merge_buffers_written",
- (char*) &export_vars.innodb_merge_buffers_written, SHOW_LONGLONG},
- {"os_merge_buffers_read",
- (char*) &export_vars.innodb_merge_buffers_read, SHOW_LONGLONG},
- {"os_merge_buffers_merged",
- (char*) &export_vars.innodb_merge_buffers_merged, SHOW_LONGLONG},
{"page_size",
(char*) &export_vars.innodb_page_size, SHOW_LONG},
{"pages_created",
@@ -1322,7 +1316,6 @@ Normalizes a table name string. A normalized name consists of the
database name catenated to '/' and table name. An example:
test/mytable. On Windows normalization puts both the database name and the
table name always to lower case if "set_lower_case" is set to TRUE. */
-static
void
normalize_table_name_low(
/*=====================*/
@@ -5237,7 +5230,6 @@ Normalizes a table name string. A normalized name consists of the
database name catenated to '/' and table name. Example: test/mytable.
On Windows normalization puts both the database name and the
table name always to lower case if "set_lower_case" is set to TRUE. */
-static
void
normalize_table_name_low(
/*=====================*/
@@ -8115,7 +8107,13 @@ ha_innobase::write_row(
ha_statistic_increment(&SSV::ha_write_count);
- if (UNIV_UNLIKELY(share->ib_table->is_corrupt)) {
+ if (share->ib_table != prebuilt->table) {
+ fprintf(stderr,
+ "InnoDB: Warning: share->ib_table %p prebuilt->table %p table %s is_corrupt %d.",
+ share->ib_table, prebuilt->table, prebuilt->table->name, prebuilt->table->is_corrupt);
+ }
+
+ if (UNIV_UNLIKELY(share->ib_table && share->ib_table->is_corrupt)) {
DBUG_RETURN(HA_ERR_CRASHED);
}
@@ -8462,7 +8460,13 @@ wsrep_error:
func_exit:
innobase_active_small();
- if (UNIV_UNLIKELY(share->ib_table->is_corrupt)) {
+ if (share->ib_table != prebuilt->table) {
+ fprintf(stderr,
+ "InnoDB: Warning: share->ib_table %p prebuilt->table %p table %s is_corrupt %d.",
+ share->ib_table, prebuilt->table, prebuilt->table->name, prebuilt->table->is_corrupt);
+ }
+
+ if (UNIV_UNLIKELY(share->ib_table && share->ib_table->is_corrupt)) {
DBUG_RETURN(HA_ERR_CRASHED);
}
@@ -8875,7 +8879,13 @@ ha_innobase::update_row(
ha_statistic_increment(&SSV::ha_update_count);
- if (UNIV_UNLIKELY(share->ib_table->is_corrupt)) {
+ if (share->ib_table != prebuilt->table) {
+ fprintf(stderr,
+ "InnoDB: Warning: share->ib_table %p prebuilt->table %p table %s is_corrupt %d.",
+ share->ib_table, prebuilt->table, prebuilt->table->name, prebuilt->table->is_corrupt);
+ }
+
+ if (UNIV_UNLIKELY(share->ib_table && share->ib_table->is_corrupt)) {
DBUG_RETURN(HA_ERR_CRASHED);
}
@@ -8990,7 +9000,13 @@ func_exit:
wsrep_error:
#endif /* WITH_WSREP */
- if (UNIV_UNLIKELY(share->ib_table->is_corrupt)) {
+ if (share->ib_table != prebuilt->table) {
+ fprintf(stderr,
+ "InnoDB: Warning: share->ib_table %p prebuilt->table %p table %s is_corrupt %d.",
+ share->ib_table, prebuilt->table, prebuilt->table->name, prebuilt->table->is_corrupt);
+ }
+
+ if (UNIV_UNLIKELY(share->ib_table && share->ib_table->is_corrupt)) {
DBUG_RETURN(HA_ERR_CRASHED);
}
@@ -12283,7 +12299,13 @@ ha_innobase::truncate()
update_thd(ha_thd());
- if (UNIV_UNLIKELY(share->ib_table->is_corrupt)) {
+ if (share->ib_table != prebuilt->table) {
+ fprintf(stderr,
+ "InnoDB: Warning: share->ib_table %p prebuilt->table %p table %s is_corrupt %d.",
+ share->ib_table, prebuilt->table, prebuilt->table->name, prebuilt->table->is_corrupt);
+ }
+
+ if (UNIV_UNLIKELY(share->ib_table && share->ib_table->is_corrupt)) {
DBUG_RETURN(HA_ERR_CRASHED);
}
@@ -12298,7 +12320,13 @@ ha_innobase::truncate()
err = row_truncate_table_for_mysql(prebuilt->table, prebuilt->trx);
- if (UNIV_UNLIKELY(share->ib_table->is_corrupt)) {
+ if (share->ib_table != prebuilt->table) {
+ fprintf(stderr,
+ "InnoDB: Warning: share->ib_table %p prebuilt->table %p table %s is_corrupt %d.",
+ share->ib_table, prebuilt->table, prebuilt->table->name, prebuilt->table->is_corrupt);
+ }
+
+ if (UNIV_UNLIKELY(share->ib_table && share->ib_table->is_corrupt)) {
DBUG_RETURN(HA_ERR_CRASHED);
}
@@ -13593,7 +13621,13 @@ ha_innobase::analyze(
{
int ret;
- if (UNIV_UNLIKELY(share->ib_table->is_corrupt)) {
+ if (share->ib_table != prebuilt->table) {
+ fprintf(stderr,
+ "InnoDB: Warning: share->ib_table %p prebuilt->table %p table %s is_corrupt %d.",
+ share->ib_table, prebuilt->table, prebuilt->table->name, prebuilt->table->is_corrupt);
+ }
+
+ if (UNIV_UNLIKELY(share->ib_table && share->ib_table->is_corrupt)) {
return(HA_ADMIN_CORRUPT);
}
@@ -13603,7 +13637,13 @@ ha_innobase::analyze(
HA_STATUS_TIME | HA_STATUS_CONST | HA_STATUS_VARIABLE,
true /* this is ANALYZE */);
- if (UNIV_UNLIKELY(share->ib_table->is_corrupt)) {
+ if (share->ib_table != prebuilt->table) {
+ fprintf(stderr,
+ "InnoDB: Warning: share->ib_table %p prebuilt->table %p table %s is_corrupt %d.",
+ share->ib_table, prebuilt->table, prebuilt->table->name, prebuilt->table->is_corrupt);
+ }
+
+ if (UNIV_UNLIKELY(share->ib_table && share->ib_table->is_corrupt)) {
return(HA_ADMIN_CORRUPT);
}
@@ -14778,7 +14818,13 @@ ha_innobase::transactional_table_lock(
update_thd(thd);
- if (UNIV_UNLIKELY(share->ib_table->is_corrupt)) {
+ if (share->ib_table != prebuilt->table) {
+ fprintf(stderr,
+ "InnoDB: Warning: share->ib_table %p prebuilt->table %p table %s is_corrupt %d.",
+ share->ib_table, prebuilt->table, prebuilt->table->name, prebuilt->table->is_corrupt);
+ }
+
+ if (UNIV_UNLIKELY(share->ib_table && share->ib_table->is_corrupt)) {
DBUG_RETURN(HA_ERR_CRASHED);
}
@@ -17840,7 +17886,6 @@ innodb_sched_priority_purge_update(
return;
}
- ut_ad(purge_sys->state == PURGE_STATE_RUN);
for (ulint i = 0; i < srv_n_purge_threads; i++) {
ulint nice = os_thread_get_priority(srv_purge_tids[i]);
ulint actual_priority
diff --git a/storage/xtradb/handler/handler0alter.cc b/storage/xtradb/handler/handler0alter.cc
index ebe2e0faa4b..70ab40534b4 100644
--- a/storage/xtradb/handler/handler0alter.cc
+++ b/storage/xtradb/handler/handler0alter.cc
@@ -166,10 +166,13 @@ my_error_innodb(
/* TODO: report the row, as we do for DB_DUPLICATE_KEY */
my_error(ER_INVALID_USE_OF_NULL, MYF(0));
break;
+ case DB_TABLESPACE_EXISTS:
+ my_error(ER_TABLESPACE_EXISTS, MYF(0), table);
+ break;
+
#ifdef UNIV_DEBUG
case DB_SUCCESS:
case DB_DUPLICATE_KEY:
- case DB_TABLESPACE_EXISTS:
case DB_ONLINE_LOG_TOO_BIG:
/* These codes should not be passed here. */
ut_error;
@@ -201,12 +204,14 @@ innobase_fulltext_exist(
/*******************************************************************//**
Determine if ALTER TABLE needs to rebuild the table.
@param ha_alter_info the DDL operation
+@param altered_table MySQL original table
@return whether it is necessary to rebuild the table */
static __attribute__((nonnull, warn_unused_result))
bool
innobase_need_rebuild(
/*==================*/
- const Alter_inplace_info* ha_alter_info)
+ const Alter_inplace_info* ha_alter_info,
+ const TABLE* altered_table)
{
if (ha_alter_info->handler_flags
== Alter_inplace_info::CHANGE_CREATE_OPTION
@@ -218,6 +223,34 @@ innobase_need_rebuild(
return(false);
}
+ /* If alter table changes column name and adds a new
+ index, we need to check is this new index created
+ to new column name. This is because column name
+ changes are done normally after creating indexes. */
+ if ((ha_alter_info->handler_flags
+ & Alter_inplace_info::ALTER_COLUMN_NAME) &&
+ ((ha_alter_info->handler_flags
+ & Alter_inplace_info::ADD_INDEX) ||
+ (ha_alter_info->handler_flags
+ & Alter_inplace_info::ADD_FOREIGN_KEY))) {
+ for (ulint i = 0; i < ha_alter_info->key_count; i++) {
+ const KEY* key = &ha_alter_info->key_info_buffer[
+ ha_alter_info->index_add_buffer[i]];
+
+ for (ulint j = 0; j < key->user_defined_key_parts; j++) {
+ const KEY_PART_INFO* key_part = &(key->key_part[j]);
+ const Field* field = altered_table->field[key_part->fieldnr];
+
+ /* Field used on added index is renamed on
+ this same alter table. We need table
+ rebuild. */
+ if (field->flags & FIELD_IS_RENAMED) {
+ return (true);
+ }
+ }
+ }
+ }
+
return(!!(ha_alter_info->handler_flags & INNOBASE_ALTER_REBUILD));
}
@@ -533,7 +566,7 @@ ha_innobase::check_if_supported_inplace_alter(
operation is possible. */
} else if (((ha_alter_info->handler_flags
& Alter_inplace_info::ADD_PK_INDEX)
- || innobase_need_rebuild(ha_alter_info))
+ || innobase_need_rebuild(ha_alter_info, table))
&& (innobase_fulltext_exist(altered_table))) {
/* Refuse to rebuild the table online, if
fulltext indexes are to survive the rebuild. */
@@ -1532,7 +1565,8 @@ innobase_create_index_def(
index_def_t* index, /*!< out: index definition */
mem_heap_t* heap, /*!< in: heap where memory
is allocated */
- const Field** fields) /*!z in: MySQL table fields */
+ const Field** fields) /*!< in: MySQL table fields
+ */
{
const KEY* key = &keys[key_number];
ulint i;
@@ -1828,9 +1862,11 @@ innobase_create_key_defs(
bool& add_fts_doc_id,
/*!< in: whether we need to add new DOC ID
column for FTS index */
- bool& add_fts_doc_idx)
+ bool& add_fts_doc_idx,
/*!< in: whether we need to add new DOC ID
index for FTS index */
+ const TABLE* table)
+ /*!< in: MySQL table that is being altered */
{
index_def_t* indexdef;
index_def_t* indexdefs;
@@ -1880,7 +1916,8 @@ innobase_create_key_defs(
}
const bool rebuild = new_primary || add_fts_doc_id
- || innobase_need_rebuild(ha_alter_info);
+ || innobase_need_rebuild(ha_alter_info, table);
+
/* Reserve one more space if new_primary is true, and we might
need to add the FTS_DOC_ID_INDEX */
indexdef = indexdefs = static_cast<index_def_t*>(
@@ -2718,7 +2755,8 @@ prepare_inplace_alter_table_dict(
ctx->heap, ha_alter_info, altered_table, ctx->num_to_add_index,
num_fts_index,
row_table_got_default_clust_index(ctx->new_table),
- fts_doc_id_col, add_fts_doc_id, add_fts_doc_id_idx);
+ fts_doc_id_col, add_fts_doc_id, add_fts_doc_id_idx,
+ old_table);
new_clustered = DICT_CLUSTERED & index_defs[0].ind_type;
@@ -2731,7 +2769,7 @@ prepare_inplace_alter_table_dict(
/* This is not an online operation (LOCK=NONE). */
} else if (ctx->add_autoinc == ULINT_UNDEFINED
&& num_fts_index == 0
- && (!innobase_need_rebuild(ha_alter_info)
+ && (!innobase_need_rebuild(ha_alter_info, old_table)
|| !innobase_fulltext_exist(altered_table))) {
/* InnoDB can perform an online operation (LOCK=NONE). */
} else {
@@ -2748,7 +2786,7 @@ prepare_inplace_alter_table_dict(
is just copied from old table and stored in indexdefs[0] */
DBUG_ASSERT(!add_fts_doc_id || new_clustered);
DBUG_ASSERT(!!new_clustered ==
- (innobase_need_rebuild(ha_alter_info)
+ (innobase_need_rebuild(ha_alter_info, old_table)
|| add_fts_doc_id));
/* Allocate memory for dictionary index definitions */
@@ -2998,7 +3036,7 @@ prepare_inplace_alter_table_dict(
add_cols, ctx->heap);
ctx->add_cols = add_cols;
} else {
- DBUG_ASSERT(!innobase_need_rebuild(ha_alter_info));
+ DBUG_ASSERT(!innobase_need_rebuild(ha_alter_info, old_table));
if (!ctx->new_table->fts
&& innobase_fulltext_exist(altered_table)) {
@@ -3019,7 +3057,7 @@ prepare_inplace_alter_table_dict(
ctx->add_index[a] = row_merge_create_index(
ctx->trx, ctx->new_table,
- &index_defs[a]);
+ &index_defs[a], ctx->col_names);
add_key_nums[a] = index_defs[a].key_number;
@@ -3873,7 +3911,7 @@ err_exit:
if (!(ha_alter_info->handler_flags & INNOBASE_ALTER_DATA)
|| (ha_alter_info->handler_flags
== Alter_inplace_info::CHANGE_CREATE_OPTION
- && !innobase_need_rebuild(ha_alter_info))) {
+ && !innobase_need_rebuild(ha_alter_info, table))) {
if (heap) {
ha_alter_info->handler_ctx
@@ -4047,7 +4085,7 @@ ok_exit:
if (ha_alter_info->handler_flags
== Alter_inplace_info::CHANGE_CREATE_OPTION
- && !innobase_need_rebuild(ha_alter_info)) {
+ && !innobase_need_rebuild(ha_alter_info, table)) {
goto ok_exit;
}
@@ -4747,9 +4785,11 @@ commit_get_autoinc(
Field* autoinc_field =
old_table->found_next_number_field;
+ KEY* autoinc_key =
+ old_table->key_info + old_table->s->next_number_index;
- dict_index_t* index = dict_table_get_index_on_first_col(
- ctx->old_table, autoinc_field->field_index);
+ dict_index_t* index = dict_table_get_index_on_name(
+ ctx->old_table, autoinc_key->name);
max_autoinc = ha_alter_info->create_info->auto_increment_value;
@@ -5157,6 +5197,61 @@ commit_cache_rebuild(
DBUG_VOID_RETURN;
}
+/** Store the column number of the columns in a list belonging
+to indexes which are not being dropped.
+@param[in] ctx In-place ALTER TABLE context
+@param[out] drop_col_list list which will be set, containing columns
+ which is part of index being dropped */
+static
+void
+get_col_list_to_be_dropped(
+ ha_innobase_inplace_ctx* ctx,
+ std::set<ulint>& drop_col_list)
+{
+ for (ulint index_count = 0; index_count < ctx->num_to_drop_index;
+ index_count++) {
+ dict_index_t* index = ctx->drop_index[index_count];
+
+ for (ulint col = 0; col < index->n_user_defined_cols; col++) {
+ ulint col_no = dict_index_get_nth_col_no(index, col);
+ drop_col_list.insert(col_no);
+ }
+ }
+}
+
+/** For each column, which is part of an index which is not going to be
+dropped, it checks if the column number of the column is same as col_no
+argument passed.
+@param[in] table table object
+@param[in] col_no column number of the column which is to be checked
+@retval true column exists
+@retval false column does not exist. */
+static
+bool
+check_col_exists_in_indexes(
+ const dict_table_t* table,
+ ulint col_no)
+{
+ for (dict_index_t* index = dict_table_get_first_index(table); index;
+ index = dict_table_get_next_index(index)) {
+
+ if (index->to_be_dropped) {
+ continue;
+ }
+
+ for (ulint col = 0; col < index->n_user_defined_cols; col++) {
+
+ ulint index_col_no = dict_index_get_nth_col_no(
+ index, col);
+ if (col_no == index_col_no) {
+ return(true);
+ }
+ }
+ }
+
+ return(false);
+}
+
/** Commit the changes made during prepare_inplace_alter_table()
and inplace_alter_table() inside the data dictionary tables,
when not rebuilding the table.
@@ -5292,6 +5387,20 @@ commit_cache_norebuild(
DBUG_ASSERT(!ctx->need_rebuild());
+ std::set<ulint> drop_list;
+ std::set<ulint>::const_iterator col_it;
+
+ /* Check if the column, part of an index to be dropped is part of any
+ other index which is not being dropped. If it so, then set the ord_part
+ of the column to 0. */
+ get_col_list_to_be_dropped(ctx, drop_list);
+
+ for(col_it = drop_list.begin(); col_it != drop_list.end(); ++col_it) {
+ if (!check_col_exists_in_indexes(ctx->new_table, *col_it)) {
+ ctx->new_table->cols[*col_it].ord_part = 0;
+ }
+ }
+
for (ulint i = 0; i < ctx->num_to_add_index; i++) {
dict_index_t* index = ctx->add_index[i];
DBUG_ASSERT(dict_index_get_online_status(index)
@@ -5492,6 +5601,7 @@ ha_innobase::commit_inplace_alter_table(
Alter_inplace_info* ha_alter_info,
bool commit)
{
+ dberr_t error;
ha_innobase_inplace_ctx* ctx0
= static_cast<ha_innobase_inplace_ctx*>
(ha_alter_info->handler_ctx);
@@ -5573,7 +5683,7 @@ ha_innobase::commit_inplace_alter_table(
transactions collected during crash recovery could be
holding InnoDB locks only, not MySQL locks. */
- dberr_t error = row_merge_lock_table(
+ error = row_merge_lock_table(
prebuilt->trx, ctx->old_table, LOCK_X);
if (error != DB_SUCCESS) {
@@ -5708,14 +5818,20 @@ ha_innobase::commit_inplace_alter_table(
= static_cast<ha_innobase_inplace_ctx*>(*pctx);
DBUG_ASSERT(ctx->need_rebuild());
- /* Generate the redo log for the file
- operations that will be performed in
- commit_cache_rebuild(). */
- fil_mtr_rename_log(ctx->old_table->space,
- ctx->old_table->name,
- ctx->new_table->space,
- ctx->new_table->name,
- ctx->tmp_name, &mtr);
+ /* Check for any possible problems for any
+ file operations that will be performed in
+ commit_cache_rebuild(), and if none, generate
+ the redo log for these operations. */
+ error = fil_mtr_rename_log(ctx->old_table,
+ ctx->new_table,
+ ctx->tmp_name, &mtr);
+ if (error != DB_SUCCESS) {
+ /* Out of memory or a problem will occur
+ when renaming files. */
+ fail = true;
+ my_error_innodb(error, ctx->old_table->name,
+ ctx->old_table->flags);
+ }
DBUG_INJECT_CRASH("ib_commit_inplace_crash",
crash_inject_count++);
}
@@ -5728,18 +5844,25 @@ ha_innobase::commit_inplace_alter_table(
DBUG_EXECUTE_IF("innodb_alter_commit_crash_before_commit",
log_buffer_flush_to_disk();
DBUG_SUICIDE(););
- ut_ad(trx_state_eq(trx, TRX_STATE_ACTIVE));
ut_ad(!trx->fts_trx);
- ut_ad(trx->insert_undo || trx->update_undo);
- /* The following call commits the
- mini-transaction, making the data dictionary
- transaction committed at mtr.end_lsn. The
- transaction becomes 'durable' by the time when
- log_buffer_flush_to_disk() returns. In the
- logical sense the commit in the file-based
- data structures happens here. */
- trx_commit_low(trx, &mtr);
+ if (fail) {
+ mtr_set_log_mode(&mtr, MTR_LOG_NO_REDO);
+ mtr_commit(&mtr);
+ trx_rollback_for_mysql(trx);
+ } else {
+ /* The following call commits the
+ mini-transaction, making the data dictionary
+ transaction committed at mtr.end_lsn. The
+ transaction becomes 'durable' by the time when
+ log_buffer_flush_to_disk() returns. In the
+ logical sense the commit in the file-based
+ data structures happens here. */
+ ut_ad(trx_state_eq(trx, TRX_STATE_ACTIVE));
+ ut_ad(trx->insert_undo || trx->update_undo);
+
+ trx_commit_low(trx, &mtr);
+ }
/* If server crashes here, the dictionary in
InnoDB and MySQL will differ. The .ibd files
@@ -5761,7 +5884,6 @@ ha_innobase::commit_inplace_alter_table(
update the in-memory structures, close some handles, release
temporary files, and (unless we rolled back) update persistent
statistics. */
- dberr_t error = DB_SUCCESS;
for (inplace_alter_handler_ctx** pctx = ctx_array;
*pctx; pctx++) {
diff --git a/storage/xtradb/include/buf0flu.h b/storage/xtradb/include/buf0flu.h
index 56b0c314b5c..2cd8eefb79d 100644
--- a/storage/xtradb/include/buf0flu.h
+++ b/storage/xtradb/include/buf0flu.h
@@ -203,7 +203,7 @@ Clears up tail of the LRU lists:
* Flush dirty pages at the tail of LRU to the disk
The depth to which we scan each buffer pool is controlled by dynamic
config parameter innodb_LRU_scan_depth.
-@return total pages flushed */
+@return number of pages flushed */
UNIV_INTERN
ulint
buf_flush_LRU_tail(void);
diff --git a/storage/xtradb/include/fil0fil.h b/storage/xtradb/include/fil0fil.h
index 7edf79043d3..da4b9a39ca3 100644
--- a/storage/xtradb/include/fil0fil.h
+++ b/storage/xtradb/include/fil0fil.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1995, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
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
@@ -668,6 +668,21 @@ fil_discard_tablespace(
ulint id) /*!< in: space id */
__attribute__((warn_unused_result));
#endif /* !UNIV_HOTBACKUP */
+
+/** Test if a tablespace file can be renamed to a new filepath by checking
+if that the old filepath exists and the new filepath does not exist.
+@param[in] space_id tablespace id
+@param[in] old_path old filepath
+@param[in] new_path new filepath
+@param[in] is_discarded whether the tablespace is discarded
+@return innodb error code */
+dberr_t
+fil_rename_tablespace_check(
+ ulint space_id,
+ const char* old_path,
+ const char* new_path,
+ bool is_discarded);
+
/*******************************************************************//**
Renames a single-table tablespace. The tablespace must be cached in the
tablespace memory cache.
@@ -1168,21 +1183,19 @@ fil_get_space_names(
/*!< in/out: Vector for collecting the names. */
__attribute__((warn_unused_result));
-/****************************************************************//**
-Generate redo logs for swapping two .ibd files */
+/** Generate redo log for swapping two .ibd files
+@param[in] old_table old table
+@param[in] new_table new table
+@param[in] tmp_name temporary table name
+@param[in,out] mtr mini-transaction
+@return innodb error code */
UNIV_INTERN
-void
+dberr_t
fil_mtr_rename_log(
-/*===============*/
- ulint old_space_id, /*!< in: tablespace id of the old
- table. */
- const char* old_name, /*!< in: old table name */
- ulint new_space_id, /*!< in: tablespace id of the new
- table */
- const char* new_name, /*!< in: new table name */
- const char* tmp_name, /*!< in: temp table name used while
- swapping */
- mtr_t* mtr) /*!< in/out: mini-transaction */
+ const dict_table_t* old_table,
+ const dict_table_t* new_table,
+ const char* tmp_name,
+ mtr_t* mtr)
__attribute__((nonnull));
/*******************************************************************//**
diff --git a/storage/xtradb/include/ha_prototypes.h b/storage/xtradb/include/ha_prototypes.h
index b10b8219f22..259cf8380a7 100644
--- a/storage/xtradb/include/ha_prototypes.h
+++ b/storage/xtradb/include/ha_prototypes.h
@@ -654,4 +654,17 @@ ib_push_warning(
const char *format,/*!< in: warning message */
...);
+/*****************************************************************//**
+Normalizes a table name string. A normalized name consists of the
+database name catenated to '/' and table name. An example:
+test/mytable. On Windows normalization puts both the database name and the
+table name always to lower case if "set_lower_case" is set to TRUE. */
+void
+normalize_table_name_low(
+/*=====================*/
+ char* norm_name, /*!< out: normalized name as a
+ null-terminated string */
+ const char* name, /*!< in: table name string */
+ ibool set_lower_case); /*!< in: TRUE if we want to set
+ name to lower case */
#endif /* HA_INNODB_PROTOTYPES_H */
diff --git a/storage/xtradb/include/os0sync.h b/storage/xtradb/include/os0sync.h
index 56c094547b1..db996b096bb 100644
--- a/storage/xtradb/include/os0sync.h
+++ b/storage/xtradb/include/os0sync.h
@@ -488,7 +488,7 @@ os_atomic_clear(volatile lock_word_t* ptr)
__atomic_clear(ptr, __ATOMIC_RELEASE);
}
-# elif defined(IB_STRONG_MEMORY_MODEL)
+# elif defined(HAVE_ATOMIC_BUILTINS)
/** Do an atomic test and set.
@param[in,out] ptr Memory location to set to non-zero
diff --git a/storage/xtradb/include/row0merge.h b/storage/xtradb/include/row0merge.h
index de353d46202..79cbf304722 100644
--- a/storage/xtradb/include/row0merge.h
+++ b/storage/xtradb/include/row0merge.h
@@ -252,8 +252,11 @@ row_merge_create_index(
/*===================*/
trx_t* trx, /*!< in/out: trx (sets error_state) */
dict_table_t* table, /*!< in: the index is on this table */
- const index_def_t* index_def);
+ const index_def_t* index_def,
/*!< in: the index definition */
+ const char** col_names);
+ /*! in: column names if columns are
+ renamed or NULL */
/*********************************************************************//**
Check if a transaction can use an index.
@return TRUE if index can be used by the transaction else FALSE */
diff --git a/storage/xtradb/include/srv0mon.h b/storage/xtradb/include/srv0mon.h
index d2b65721e1a..2d90f47eefe 100644
--- a/storage/xtradb/include/srv0mon.h
+++ b/storage/xtradb/include/srv0mon.h
@@ -2,7 +2,6 @@
Copyright (c) 2010, 2013, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2012, Facebook Inc.
-Copyright (c) 2014, 2015, MariaDB Corporation.
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
@@ -256,9 +255,6 @@ enum monitor_id_t {
MONITOR_OVLD_OS_LOG_FSYNC,
MONITOR_OVLD_OS_LOG_PENDING_FSYNC,
MONITOR_OVLD_OS_LOG_PENDING_WRITES,
- MONITOR_MERGE_BLOCKS_WRITTEN,
- MONITOR_MERGE_BLOCKS_READ,
- MONITOR_MERGE_BLOCKS_MERGED,
/* Transaction related counters */
MONITOR_MODULE_TRX,
diff --git a/storage/xtradb/include/srv0srv.h b/storage/xtradb/include/srv0srv.h
index 567e5dc5f16..c968002349f 100644
--- a/storage/xtradb/include/srv0srv.h
+++ b/storage/xtradb/include/srv0srv.h
@@ -3,7 +3,7 @@
Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2008, 2009, Google Inc.
Copyright (c) 2009, Percona Inc.
-Copyright (c) 2013, 2015, MariaDB Corporation.
+Copyright (c) 2013, 2014, SkySQL Ab. All Rights Reserved.
Portions of this file contain modifications contributed and copyrighted by
Google, Inc. Those modifications are gratefully acknowledged and are described
@@ -145,13 +145,6 @@ struct srv_stats_t {
/** Number of lock waits that have been up to max time (i.e.) lock
wait timeout */
ulint_ctr_1_t n_lock_max_wait_time;
-
- /** Number of merge buffers written */
- ulint_ctr_64_t merge_buffers_written;
- /** Number of merge buffers read */
- ulint_ctr_64_t merge_buffers_read;
- /** Number of merge buffers merged */
- ulint_ctr_64_t merge_buffers_merged;
};
extern const char* srv_main_thread_op_info;
@@ -1104,9 +1097,6 @@ struct export_var_t{
ulint innodb_purge_view_trx_id_age; /*!< rw_max_trx_id
- purged view's min trx_id */
#endif /* UNIV_DEBUG */
- ib_int64_t innodb_merge_buffers_written;
- ib_int64_t innodb_merge_buffers_read;
- ib_int64_t innodb_merge_buffers_merged;
};
/** Thread slot in the thread table. */
diff --git a/storage/xtradb/include/univ.i b/storage/xtradb/include/univ.i
index ac0039309e5..cd2803d1855 100644
--- a/storage/xtradb/include/univ.i
+++ b/storage/xtradb/include/univ.i
@@ -44,10 +44,10 @@ Created 1/20/1994 Heikki Tuuri
#define INNODB_VERSION_MAJOR 5
#define INNODB_VERSION_MINOR 6
-#define INNODB_VERSION_BUGFIX 26
+#define INNODB_VERSION_BUGFIX 28
#ifndef PERCONA_INNODB_VERSION
-#define PERCONA_INNODB_VERSION 76.0
+#define PERCONA_INNODB_VERSION 76.1
#endif
/* Enable UNIV_LOG_ARCHIVE in XtraDB */
diff --git a/storage/xtradb/log/log0recv.cc b/storage/xtradb/log/log0recv.cc
index 7d12c2fb678..b5b070bec43 100644
--- a/storage/xtradb/log/log0recv.cc
+++ b/storage/xtradb/log/log0recv.cc
@@ -835,6 +835,10 @@ not_consistent:
fprintf(stderr,
"InnoDB: No valid checkpoint found.\n"
+ "InnoDB: If you are attempting downgrade"
+ " from MySQL 5.7.9 or later,\n"
+ "InnoDB: please refer to " REFMAN
+ "upgrading-downgrading.html\n"
"InnoDB: If this error appears when you are"
" creating an InnoDB database,\n"
"InnoDB: the problem may be that during"
diff --git a/storage/xtradb/row/row0import.cc b/storage/xtradb/row/row0import.cc
index fc1a72b5695..80038526f02 100644
--- a/storage/xtradb/row/row0import.cc
+++ b/storage/xtradb/row/row0import.cc
@@ -2068,8 +2068,20 @@ PageConverter::validate(
return(IMPORT_PAGE_STATUS_CORRUPTED);
} else if (offset > 0 && page_get_page_no(page) == 0) {
- const byte* b = page;
- const byte* e = b + m_page_size;
+ ulint checksum;
+
+ checksum = mach_read_from_4(page + FIL_PAGE_SPACE_OR_CHKSUM);
+ if (checksum != 0) {
+ /* Checksum check passed in buf_page_is_corrupted(). */
+ ib_logf(IB_LOG_LEVEL_WARN,
+ "%s: Page %lu checksum %lu should be zero.",
+ m_filepath, (ulong) (offset / m_page_size),
+ checksum);
+ }
+
+ const byte* b = page + FIL_PAGE_OFFSET;
+ const byte* e = page + m_page_size
+ - FIL_PAGE_END_LSN_OLD_CHKSUM;
/* If the page number is zero and offset > 0 then
the entire page MUST consist of zeroes. If not then
diff --git a/storage/xtradb/row/row0log.cc b/storage/xtradb/row/row0log.cc
index 7c7ae7be2e0..fa0b0887442 100644
--- a/storage/xtradb/row/row0log.cc
+++ b/storage/xtradb/row/row0log.cc
@@ -1454,6 +1454,7 @@ row_log_table_apply_insert_low(
dtuple_t* entry;
const row_log_t*log = dup->index->online_log;
dict_index_t* index = dict_table_get_first_index(log->table);
+ ulint n_index = 0;
ut_ad(dtuple_validate(row));
ut_ad(trx_id);
@@ -1489,6 +1490,8 @@ row_log_table_apply_insert_low(
}
do {
+ n_index++;
+
if (!(index = dict_table_get_next_index(index))) {
break;
}
@@ -1501,6 +1504,12 @@ row_log_table_apply_insert_low(
error = row_ins_sec_index_entry_low(
flags, BTR_MODIFY_TREE,
index, offsets_heap, heap, entry, trx_id, thr);
+
+ /* Report correct index name for duplicate key error. */
+ if (error == DB_DUPLICATE_KEY) {
+ thr_get_trx(thr)->error_key_num = n_index;
+ }
+
} while (error == DB_SUCCESS);
return(error);
@@ -1808,6 +1817,7 @@ row_log_table_apply_update(
mtr_t mtr;
btr_pcur_t pcur;
dberr_t error;
+ ulint n_index = 0;
ut_ad(dtuple_get_n_fields_cmp(old_pk)
== dict_index_get_n_unique(index));
@@ -2083,6 +2093,8 @@ func_exit_committed:
break;
}
+ n_index++;
+
if (index->type & DICT_FTS) {
continue;
}
@@ -2126,6 +2138,11 @@ func_exit_committed:
BTR_MODIFY_TREE, index, offsets_heap, heap,
entry, trx_id, thr);
+ /* Report correct index name for duplicate key error. */
+ if (error == DB_DUPLICATE_KEY) {
+ thr_get_trx(thr)->error_key_num = n_index;
+ }
+
mtr_start(&mtr);
}
diff --git a/storage/xtradb/row/row0merge.cc b/storage/xtradb/row/row0merge.cc
index 1c6cbdbd427..a1de6b292ce 100644
--- a/storage/xtradb/row/row0merge.cc
+++ b/storage/xtradb/row/row0merge.cc
@@ -1,7 +1,6 @@
/*****************************************************************************
Copyright (c) 2005, 2015, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2014, 2015, MariaDB Corporation.
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
@@ -874,8 +873,6 @@ row_merge_read(
success = os_file_read_no_error_handling(OS_FILE_FROM_FD(fd), buf,
ofs, srv_sort_buf_size);
- srv_stats.merge_buffers_read.inc();
-
#ifdef POSIX_FADV_DONTNEED
/* Each block is read exactly once. Free up the file cache. */
posix_fadvise(fd, ofs, srv_sort_buf_size, POSIX_FADV_DONTNEED);
@@ -910,7 +907,6 @@ row_merge_write(
DBUG_EXECUTE_IF("row_merge_write_failure", return(FALSE););
ret = os_file_write("(merge)", OS_FILE_FROM_FD(fd), buf, ofs, buf_len);
- srv_stats.merge_buffers_written.inc();
#ifdef UNIV_DEBUG
if (row_merge_print_block_write) {
@@ -1748,7 +1744,7 @@ write_buffers:
/* We have enough data tuples to form a block.
Sort them and write to disk. */
- if (UNIV_LIKELY(buf->n_tuples)) {
+ if (buf->n_tuples) {
if (dict_index_is_unique(buf->index)) {
row_merge_dup_t dup = {
buf->index, table, col_map, 0};
@@ -1789,17 +1785,13 @@ write_buffers:
dict_index_get_lock(buf->index));
}
- /* Do not write empty buffers to temporary file */
- if (buf->n_tuples) {
-
- row_merge_buf_write(buf, file, block);
+ row_merge_buf_write(buf, file, block);
- if (!row_merge_write(file->fd, file->offset++,
- block)) {
- err = DB_TEMP_FILE_WRITE_FAILURE;
- trx->error_key_num = i;
- break;
- }
+ if (!row_merge_write(file->fd, file->offset++,
+ block)) {
+ err = DB_TEMP_FILE_WRITE_FAILURE;
+ trx->error_key_num = i;
+ break;
}
UNIV_MEM_INVALID(&block[0], srv_sort_buf_size);
@@ -2084,9 +2076,6 @@ done1:
mem_heap_free(heap);
b2 = row_merge_write_eof(&block[2 * srv_sort_buf_size],
b2, of->fd, &of->offset);
-
- srv_stats.merge_buffers_merged.inc();
-
return(b2 ? DB_SUCCESS : DB_CORRUPTION);
}
@@ -3470,8 +3459,11 @@ row_merge_create_index(
/*===================*/
trx_t* trx, /*!< in/out: trx (sets error_state) */
dict_table_t* table, /*!< in: the index is on this table */
- const index_def_t* index_def)
+ const index_def_t* index_def,
/*!< in: the index definition */
+ const char** col_names)
+ /*! in: column names if columns are
+ renamed or NULL */
{
dict_index_t* index;
dberr_t err;
@@ -3491,9 +3483,24 @@ row_merge_create_index(
for (i = 0; i < n_fields; i++) {
index_field_t* ifield = &index_def->fields[i];
- const char * col_name = ifield->col_name ?
- dict_table_get_col_name_for_mysql(table, ifield->col_name) :
- dict_table_get_col_name(table, ifield->col_no);
+ const char * col_name;
+
+ /*
+ Alter table renaming a column and then adding a index
+ to this new name e.g ALTER TABLE t
+ CHANGE COLUMN b c INT NOT NULL, ADD UNIQUE INDEX (c);
+ requires additional check as column names are not yet
+ changed when new index definitions are created. Table's
+ new column names are on a array of column name pointers
+ if any of the column names are changed. */
+
+ if (col_names && col_names[i]) {
+ col_name = col_names[i];
+ } else {
+ col_name = ifield->col_name ?
+ dict_table_get_col_name_for_mysql(table, ifield->col_name) :
+ dict_table_get_col_name(table, ifield->col_no);
+ }
dict_mem_index_add_field(
index,
@@ -3772,21 +3779,17 @@ wait_again:
DEBUG_FTS_SORT_PRINT("FTS_SORT: Complete Insert\n");
#endif
} else {
- /* Sorting and inserting is required only if
- there really is records */
- if (UNIV_LIKELY(merge_files[i].n_rec)) {
- row_merge_dup_t dup = {
- sort_idx, table, col_map, 0};
-
- error = row_merge_sort(
- trx, &dup, &merge_files[i],
- block, &tmpfd);
-
- if (error == DB_SUCCESS) {
- error = row_merge_insert_index_tuples(
- trx->id, sort_idx, old_table,
- merge_files[i].fd, block);
- }
+ row_merge_dup_t dup = {
+ sort_idx, table, col_map, 0};
+
+ error = row_merge_sort(
+ trx, &dup, &merge_files[i],
+ block, &tmpfd);
+
+ if (error == DB_SUCCESS) {
+ error = row_merge_insert_index_tuples(
+ trx->id, sort_idx, old_table,
+ merge_files[i].fd, block);
}
}
diff --git a/storage/xtradb/row/row0mysql.cc b/storage/xtradb/row/row0mysql.cc
index 6bb5a61b635..999bfbd401e 100644
--- a/storage/xtradb/row/row0mysql.cc
+++ b/storage/xtradb/row/row0mysql.cc
@@ -4808,6 +4808,7 @@ row_rename_table_for_mysql(
pars_info_t* info = NULL;
int retry;
bool aux_fts_rename = false;
+ char* is_part = NULL;
ut_a(old_name != NULL);
ut_a(new_name != NULL);
@@ -4845,6 +4846,55 @@ row_rename_table_for_mysql(
table = dict_table_open_on_name(old_name, dict_locked, FALSE,
DICT_ERR_IGNORE_NONE);
+ /* We look for pattern #P# to see if the table is partitioned
+ MySQL table. */
+#ifdef __WIN__
+ is_part = strstr((char *)old_name, (char *)"#p#");
+#else
+ is_part = strstr((char *)old_name, (char *)"#P#");
+#endif /* __WIN__ */
+
+ /* MySQL partition engine hard codes the file name
+ separator as "#P#". The text case is fixed even if
+ lower_case_table_names is set to 1 or 2. This is true
+ for sub-partition names as well. InnoDB always
+ normalises file names to lower case on Windows, this
+ can potentially cause problems when copying/moving
+ tables between platforms.
+
+ 1) If boot against an installation from Windows
+ platform, then its partition table name could
+ be all be in lower case in system tables. So we
+ will need to check lower case name when load table.
+
+ 2) If we boot an installation from other case
+ sensitive platform in Windows, we might need to
+ check the existence of table name without lowering
+ case them in the system table. */
+ if (!table &&
+ is_part &&
+ innobase_get_lower_case_table_names() == 1) {
+ char par_case_name[MAX_FULL_NAME_LEN + 1];
+#ifndef __WIN__
+ /* Check for the table using lower
+ case name, including the partition
+ separator "P" */
+ memcpy(par_case_name, old_name,
+ strlen(old_name));
+ par_case_name[strlen(old_name)] = 0;
+ innobase_casedn_str(par_case_name);
+#else
+ /* On Windows platfrom, check
+ whether there exists table name in
+ system table whose name is
+ not being normalized to lower case */
+ normalize_table_name_low(
+ par_case_name, old_name, FALSE);
+#endif
+ table = dict_table_open_on_name(par_case_name, dict_locked, FALSE,
+ DICT_ERR_IGNORE_NONE);
+ }
+
if (!table) {
err = DB_TABLE_NOT_FOUND;
ut_print_timestamp(stderr);
diff --git a/storage/xtradb/srv/srv0mon.cc b/storage/xtradb/srv/srv0mon.cc
index 960c889f871..a0dd32c203f 100644
--- a/storage/xtradb/srv/srv0mon.cc
+++ b/storage/xtradb/srv/srv0mon.cc
@@ -2,7 +2,6 @@
Copyright (c) 2010, 2014, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2012, Facebook Inc.
-Copyright (c) 2014, 2015, MariaDB Corporation.
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
@@ -675,24 +674,6 @@ static monitor_info_t innodb_counter_info[] =
MONITOR_EXISTING | MONITOR_DEFAULT_ON),
MONITOR_DEFAULT_START, MONITOR_OVLD_OS_LOG_PENDING_WRITES},
- {"os_merge_blocks_written", "os",
- "Number of merge blocks written (innodb_os_merge_blocks_written)",
- static_cast<monitor_type_t>(
- MONITOR_EXISTING | MONITOR_DEFAULT_ON),
- MONITOR_DEFAULT_START, MONITOR_MERGE_BLOCKS_WRITTEN},
-
- {"os_merge_blocks_read", "os",
- "Number of merge blocks read (innodb_os_merge_blocks_read)",
- static_cast<monitor_type_t>(
- MONITOR_EXISTING | MONITOR_DEFAULT_ON),
- MONITOR_DEFAULT_START, MONITOR_MERGE_BLOCKS_READ},
-
- {"os_merge_blocks_merged", "os",
- "Number of merge blocks merged (innodb_os_merge_blocks_merged)",
- static_cast<monitor_type_t>(
- MONITOR_EXISTING | MONITOR_DEFAULT_ON),
- MONITOR_DEFAULT_START, MONITOR_MERGE_BLOCKS_MERGED},
-
/* ========== Counters for Transaction Module ========== */
{"module_trx", "transaction", "Transaction Manager",
MONITOR_MODULE,
@@ -1645,21 +1626,6 @@ srv_mon_process_existing_counter(
update_min = TRUE;
break;
- /* innodb_os_merge_blocks_written */
- case MONITOR_MERGE_BLOCKS_WRITTEN:
- value = srv_stats.merge_buffers_written;
- break;
-
- /* innodb_os_merge_blocks_read */
- case MONITOR_MERGE_BLOCKS_READ:
- value = srv_stats.merge_buffers_read;
- break;
-
- /* innodb_os_merge_blocks_merged */
- case MONITOR_MERGE_BLOCKS_MERGED:
- value = srv_stats.merge_buffers_merged;
- break;
-
/* innodb_log_waits */
case MONITOR_OVLD_LOG_WAITS:
value = srv_stats.log_waits;
diff --git a/storage/xtradb/srv/srv0srv.cc b/storage/xtradb/srv/srv0srv.cc
index 8b6b79f7e63..2008ca07b84 100644
--- a/storage/xtradb/srv/srv0srv.cc
+++ b/storage/xtradb/srv/srv0srv.cc
@@ -3,7 +3,7 @@
Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, 2009 Google Inc.
Copyright (c) 2009, Percona Inc.
-Copyright (c) 2013, 2015, MariaDB Corporation.
+Copyright (c) 2013, 2014, SkySQL Ab. All Rights Reserved.
Portions of this file contain modifications contributed and copyrighted by
Google, Inc. Those modifications are gratefully acknowledged and are described
@@ -1953,10 +1953,6 @@ srv_export_innodb_status(void)
}
#endif /* UNIV_DEBUG */
- export_vars.innodb_merge_buffers_written = srv_stats.merge_buffers_written;
- export_vars.innodb_merge_buffers_read = srv_stats.merge_buffers_read;
- export_vars.innodb_merge_buffers_merged = srv_stats.merge_buffers_merged;
-
mutex_exit(&srv_innodb_monitor_mutex);
}
diff --git a/storage/xtradb/srv/srv0start.cc b/storage/xtradb/srv/srv0start.cc
index c2994c57ae7..27e95a272e3 100644
--- a/storage/xtradb/srv/srv0start.cc
+++ b/storage/xtradb/srv/srv0start.cc
@@ -175,6 +175,9 @@ static const ulint SRV_UNDO_TABLESPACE_SIZE_IN_PAGES =
#define SRV_N_PENDING_IOS_PER_THREAD OS_AIO_N_PENDING_IOS_PER_THREAD
#define SRV_MAX_N_PENDING_SYNC_IOS 100
+/** The round off to MB is similar as done in srv_parse_megabytes() */
+#define CALC_NUMBER_OF_PAGES(size) ((size) / (1024 * 1024)) * \
+ ((1024 * 1024) / (UNIV_PAGE_SIZE))
#ifdef UNIV_PFS_THREAD
/* Keys to register InnoDB threads with performance schema */
UNIV_INTERN mysql_pfs_key_t io_handler_thread_key;
@@ -1008,10 +1011,16 @@ open_or_create_data_files(
size_check:
size = os_file_get_size(files[i]);
ut_a(size != (os_offset_t) -1);
- /* Round size downward to megabytes */
- rounded_size_pages = (ulint)
- (size >> UNIV_PAGE_SIZE_SHIFT);
+ /* Under some error conditions like disk full
+ narios or file size reaching filesystem
+ limit the data file could contain an incomplete
+ extent at the end. When we extend a data file
+ and if some failure happens, then also the data
+ file could contain an incomplete extent. So we
+ need to round the size downward to a megabyte.*/
+
+ rounded_size_pages = (ulint) CALC_NUMBER_OF_PAGES(size);
if (i == srv_n_data_files - 1
&& srv_auto_extend_last_data_file) {
diff --git a/storage/xtradb/sync/sync0sync.cc b/storage/xtradb/sync/sync0sync.cc
index cfd8f27c389..8e17975e1c7 100644
--- a/storage/xtradb/sync/sync0sync.cc
+++ b/storage/xtradb/sync/sync0sync.cc
@@ -1640,34 +1640,49 @@ sync_print_wait_info(
/*=================*/
FILE* file) /*!< in: file where to print */
{
+ // Sum counter values once
+ ib_int64_t mutex_spin_wait_count_val
+ = static_cast<ib_int64_t>(mutex_spin_wait_count);
+ ib_int64_t mutex_spin_round_count_val
+ = static_cast<ib_int64_t>(mutex_spin_round_count);
+ ib_int64_t mutex_os_wait_count_val
+ = static_cast<ib_int64_t>(mutex_os_wait_count);
+ ib_int64_t rw_s_spin_wait_count_val
+ = static_cast<ib_int64_t>(rw_lock_stats.rw_s_spin_wait_count);
+ ib_int64_t rw_s_spin_round_count_val
+ = static_cast<ib_int64_t>(rw_lock_stats.rw_s_spin_round_count);
+ ib_int64_t rw_s_os_wait_count_val
+ = static_cast<ib_int64_t>(rw_lock_stats.rw_s_os_wait_count);
+ ib_int64_t rw_x_spin_wait_count_val
+ = static_cast<ib_int64_t>(rw_lock_stats.rw_x_spin_wait_count);
+ ib_int64_t rw_x_spin_round_count_val
+ = static_cast<ib_int64_t>(rw_lock_stats.rw_x_spin_round_count);
+ ib_int64_t rw_x_os_wait_count_val
+ = static_cast<ib_int64_t>(rw_lock_stats.rw_x_os_wait_count);
+
fprintf(file,
- "Mutex spin waits " UINT64PF ", rounds " UINT64PF ", "
- "OS waits " UINT64PF "\n"
- "RW-shared spins " UINT64PF ", rounds " UINT64PF ", "
- "OS waits " UINT64PF "\n"
- "RW-excl spins " UINT64PF ", rounds " UINT64PF ", "
- "OS waits " UINT64PF "\n",
- (ib_uint64_t) mutex_spin_wait_count,
- (ib_uint64_t) mutex_spin_round_count,
- (ib_uint64_t) mutex_os_wait_count,
- (ib_uint64_t) rw_lock_stats.rw_s_spin_wait_count,
- (ib_uint64_t) rw_lock_stats.rw_s_spin_round_count,
- (ib_uint64_t) rw_lock_stats.rw_s_os_wait_count,
- (ib_uint64_t) rw_lock_stats.rw_x_spin_wait_count,
- (ib_uint64_t) rw_lock_stats.rw_x_spin_round_count,
- (ib_uint64_t) rw_lock_stats.rw_x_os_wait_count);
+ "Mutex spin waits " INT64PF ", rounds " INT64PF ", "
+ "OS waits " INT64PF "\n"
+ "RW-shared spins " INT64PF ", rounds " INT64PF ", "
+ "OS waits " INT64PF "\n"
+ "RW-excl spins " INT64PF ", rounds " INT64PF ", "
+ "OS waits " INT64PF "\n",
+ mutex_spin_wait_count_val, mutex_spin_round_count_val,
+ mutex_os_wait_count_val,
+ rw_s_spin_wait_count_val, rw_s_spin_round_count_val,
+ rw_s_os_wait_count_val,
+ rw_x_spin_wait_count_val, rw_x_spin_round_count_val,
+ rw_x_os_wait_count_val);
fprintf(file,
"Spin rounds per wait: %.2f mutex, %.2f RW-shared, "
"%.2f RW-excl\n",
- (double) mutex_spin_round_count /
- (mutex_spin_wait_count ? mutex_spin_wait_count : 1),
- (double) rw_lock_stats.rw_s_spin_round_count /
- (rw_lock_stats.rw_s_spin_wait_count
- ? rw_lock_stats.rw_s_spin_wait_count : 1),
- (double) rw_lock_stats.rw_x_spin_round_count /
- (rw_lock_stats.rw_x_spin_wait_count
- ? rw_lock_stats.rw_x_spin_wait_count : 1));
+ (double) mutex_spin_round_count_val /
+ (mutex_spin_wait_count_val ? mutex_spin_wait_count_val : 1LL),
+ (double) rw_s_spin_round_count_val /
+ (rw_s_spin_wait_count_val ? rw_s_spin_wait_count_val : 1LL),
+ (double) rw_x_spin_round_count_val /
+ (rw_x_spin_wait_count_val ? rw_x_spin_wait_count_val : 1LL));
}
/*******************************************************************//**
diff --git a/unittest/mysys/CMakeLists.txt b/unittest/mysys/CMakeLists.txt
index b209da39edc..41822b1e195 100644
--- a/unittest/mysys/CMakeLists.txt
+++ b/unittest/mysys/CMakeLists.txt
@@ -13,9 +13,9 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-MY_ADD_TESTS(bitmap base64 my_vsnprintf my_atomic my_rdtsc lf my_malloc
- my_getopt
+MY_ADD_TESTS(bitmap base64 my_atomic my_rdtsc lf my_malloc my_getopt dynstring
LINK_LIBRARIES mysys)
+MY_ADD_TESTS(my_vsnprintf LINK_LIBRARIES strings mysys)
MY_ADD_TESTS(ma_dyncol
LINK_LIBRARIES mysqlclient)
diff --git a/unittest/mysys/dynstring-t.c b/unittest/mysys/dynstring-t.c
new file mode 100644
index 00000000000..fed8488da2c
--- /dev/null
+++ b/unittest/mysys/dynstring-t.c
@@ -0,0 +1,74 @@
+/* Copyright (c) 2016, MariaDB
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+//#include <my_global.h>
+#include <m_string.h>
+#include <my_sys.h>
+#include <tap.h>
+
+DYNAMIC_STRING str1;
+
+static void check(const char *res)
+{
+ ok(strcmp(str1.str, res) == 0, "strcmp: %s", str1.str);
+ str1.length= 0;
+}
+
+int main(void)
+{
+ plan(23);
+
+ IF_WIN(skip_all("Test of POSIX shell escaping rules, not for CMD.EXE\n"), );
+
+ ok(init_dynamic_string(&str1, NULL, 0, 32) == 0, "init");
+
+ ok(dynstr_append_os_quoted(&str1, "test1", NULL) == 0, "append");
+ check("'test1'");
+
+ ok(dynstr_append_os_quoted(&str1, "con", "cat", NULL) == 0, "append");
+ check("'concat'");
+
+ ok(dynstr_append_os_quoted(&str1, "", NULL) == 0, "append");
+ check("''");
+
+ ok(dynstr_append_os_quoted(&str1, "space inside", NULL) == 0, "append");
+ check("'space inside'");
+
+ ok(dynstr_append_os_quoted(&str1, "single'quote", NULL) == 0, "append");
+ check("'single'\"'\"'quote'");
+
+ ok(dynstr_append_os_quoted(&str1, "many'single'quotes", NULL) == 0, "append");
+ check("'many'\"'\"'single'\"'\"'quotes'");
+
+ ok(dynstr_append_os_quoted(&str1, "'single quoted'", NULL) == 0, "append");
+ check("''\"'\"'single quoted'\"'\"''");
+
+ ok(dynstr_append_os_quoted(&str1, "double\"quote", NULL) == 0, "append");
+ check("'double\"quote'");
+
+ ok(dynstr_append_os_quoted(&str1, "mixed\"single'and\"double'quotes", NULL) == 0, "append");
+ check("'mixed\"single'\"'\"'and\"double'\"'\"'quotes'");
+
+ ok(dynstr_append_os_quoted(&str1, "back\\space", NULL) == 0, "append");
+ check("'back\\space'");
+
+ ok(dynstr_append_os_quoted(&str1, "backspace\\'and\\\"quote", NULL) == 0, "append");
+ check("'backspace\\'\"'\"'and\\\"quote'");
+
+ dynstr_free(&str1);
+
+ return exit_status();
+}
+
diff --git a/unittest/strings/CMakeLists.txt b/unittest/strings/CMakeLists.txt
index 10791edfb61..245747538c9 100644
--- a/unittest/strings/CMakeLists.txt
+++ b/unittest/strings/CMakeLists.txt
@@ -1,3 +1,3 @@
-MY_ADD_TESTS(strings LINK_LIBRARIES strings)
+MY_ADD_TESTS(strings LINK_LIBRARIES strings mysys)
diff --git a/vio/viosslfactories.c b/vio/viosslfactories.c
index 96275b95f68..5d7fe60e453 100644
--- a/vio/viosslfactories.c
+++ b/vio/viosslfactories.c
@@ -17,6 +17,10 @@
#include "vio_priv.h"
#ifdef HAVE_OPENSSL
+#ifndef HAVE_YASSL
+#include <openssl/dh.h>
+#include <openssl/bn.h>
+#endif
static my_bool ssl_algorithms_added = FALSE;
static my_bool ssl_error_strings_loaded= FALSE;
diff --git a/win/packaging/ca/CMakeLists.txt b/win/packaging/ca/CMakeLists.txt
index c57ae4b2113..04d5408b9c9 100644
--- a/win/packaging/ca/CMakeLists.txt
+++ b/win/packaging/ca/CMakeLists.txt
@@ -18,9 +18,6 @@ SET(WIXCA_SOURCES CustomAction.cpp CustomAction.def)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/sql)
-
-
-
ADD_VERSION_INFO(wixca SHARED WIXCA_SOURCES)
ADD_LIBRARY(wixca SHARED EXCLUDE_FROM_ALL ${WIXCA_SOURCES})
TARGET_LINK_LIBRARIES(wixca ${WIX_WCAUTIL_LIBRARY} ${WIX_DUTIL_LIBRARY}